clang
15.0.0git
|
Classes | |
class | ExpressionHandler |
Handles expressions during the tracking. More... | |
class | StoreHandler |
Handles stores during the tracking. More... | |
struct | StoreInfo |
Describes an event when the value got stored into a memory region. More... | |
class | Tracker |
A generalized component for tracking expressions, values, and stores. More... | |
class | TrackingBugReporterVisitor |
Visitor that tracks expressions and values. More... | |
struct | TrackingOptions |
Defines a set of options altering tracking behavior. More... | |
Typedefs | |
using | TrackerRef = llvm::IntrusiveRefCntPtr< Tracker > |
Enumerations | |
enum | TrackingKind { TrackingKind::Thorough, TrackingKind::Condition } |
Specifies the type of tracking for an expression. More... | |
Functions | |
bool | trackExpressionValue (const ExplodedNode *N, const Expr *E, PathSensitiveBugReport &R, TrackingOptions Opts={}) |
Attempts to add visitors to track expression value back to its point of origin. More... | |
void | trackStoredValue (KnownSVal V, const MemRegion *R, PathSensitiveBugReport &Report, TrackingOptions Opts={}, const StackFrameContext *Origin=nullptr) |
Track how the value got stored into the given region and where it came from. More... | |
const Expr * | getDerefExpr (const Stmt *S) |
using clang::ento::bugreporter::TrackerRef = typedef llvm::IntrusiveRefCntPtr<Tracker> |
Definition at line 156 of file BugReporterVisitors.h.
|
strong |
Specifies the type of tracking for an expression.
Definition at line 95 of file BugReporterVisitors.h.
Referenced by peelOffOuterExpr().
bool clang::ento::bugreporter::trackExpressionValue | ( | const ExplodedNode * | N, |
const Expr * | E, | ||
PathSensitiveBugReport & | R, | ||
TrackingOptions | Opts = {} |
||
) |
Attempts to add visitors to track expression value back to its point of origin.
N | A node "downstream" from the evaluation of the statement. |
E | The expression value which we are tracking |
R | The bug report to which visitors should be attached. |
Opts | Tracking options specifying how we are tracking the value. |
true
does not actually imply that any visitors were added. Referenced by emitBug().
void clang::ento::bugreporter::trackStoredValue | ( | KnownSVal | V, |
const MemRegion * | R, | ||
PathSensitiveBugReport & | Report, | ||
TrackingOptions | Opts = {} , |
||
const StackFrameContext * | Origin = nullptr |
||
) |
Track how the value got stored into the given region and where it came from.
V | We're searching for the store where R received this value. |
R | The region we're tracking. |
Opts | Tracking options specifying how we want to track the value. |
Origin | 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. |