class StoreSiteFinder

Declaration

class StoreSiteFinder : public TrackingBugReporterVisitor { /* full declaration omitted */ };

Description

Finds last store into the given region, which is different from a given symbolic value.

Declared at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1198

Inherits from: TrackingBugReporterVisitor

Member Variables

private const clang::ento::MemRegion* R
private clang::ento::SVal V
private bool Satisfied = false
private clang::ento::bugreporter::TrackingOptions Options
private const clang::StackFrameContext* OriginSFC

Method Overview

  • public void Profile(llvm::FoldingSetNodeID & ID) const
  • public StoreSiteFinder(bugreporter::TrackerRef ParentTracker, clang::ento::KnownSVal V, const clang::ento::MemRegion * R, clang::ento::bugreporter::TrackingOptions Options, const clang::StackFrameContext * OriginSFC = nullptr)
  • public clang::ento::PathDiagnosticPieceRef VisitNode(const clang::ento::ExplodedNode * N, clang::ento::BugReporterContext & BRC, clang::ento::PathSensitiveBugReport & BR)

Inherited from TrackingBugReporterVisitor:

Inherited from BugReporterVisitor:

Inherited from FoldingSetBase::Node:

Methods

void Profile(llvm::FoldingSetNodeID& ID) const

Declared at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1225

Parameters

llvm::FoldingSetNodeID& ID

StoreSiteFinder(
    bugreporter::TrackerRef ParentTracker,
    clang::ento::KnownSVal V,
    const clang::ento::MemRegion* R,
    clang::ento::bugreporter::TrackingOptions
        Options,
    const clang::StackFrameContext* OriginSFC =
        nullptr)

Declared at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1217

Parameters

bugreporter::TrackerRef ParentTracker
clang::ento::KnownSVal V
We're searching for the store where \c R received this value.
const clang::ento::MemRegion* R
The region we're tracking.
clang::ento::bugreporter::TrackingOptions Options
Tracking behavior options.
const clang::StackFrameContext* OriginSFC = nullptr
Only adds notes when the last store happened in a different stackframe to this one. Disregarded if the tracking kind is thorough. This is useful, because for non-tracked regions, notes about changes to its value in a nested stackframe could be pruned, and this visitor can prevent that without polluting the bugpath too much.

clang::ento::PathDiagnosticPieceRef VisitNode(
    const clang::ento::ExplodedNode* N,
    clang::ento::BugReporterContext& BRC,
    clang::ento::PathSensitiveBugReport& BR)

Description

Return a diagnostic piece which should be associated with the given node. Note that this function does *not* get run on the very last node of the report, as the PathDiagnosticPiece associated with the last node should be unique. Use \ref getEndPath to customize the note associated with the report end instead. The last parameter can be used to register a new visitor with the given BugReport while processing a node.

Declared at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1227

Parameters

const clang::ento::ExplodedNode* N
clang::ento::BugReporterContext& BRC
clang::ento::PathSensitiveBugReport& BR