class TrackConstraintBRVisitor
Declaration
class TrackConstraintBRVisitor : public BugReporterVisitor { /* full declaration omitted */ };
Description
BugReporterVisitors are used to add custom diagnostics along a path.
Declared at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:387
Inherits from: BugReporterVisitor
Member Variables
- private clang::ento::DefinedSVal Constraint
- private bool Assumption
- private bool IsSatisfied = false
- private bool IsZeroCheck
- private bool IsTrackingTurnedOn = false
- We should start tracking from the last node along the path in which the value is constrained.
Method Overview
- public void Profile(llvm::FoldingSetNodeID & ID) const
- public TrackConstraintBRVisitor(clang::ento::DefinedSVal constraint, bool assumption)
- public clang::ento::PathDiagnosticPieceRef VisitNode(const clang::ento::ExplodedNode * N, clang::ento::BugReporterContext & BRC, clang::ento::PathSensitiveBugReport & BR)
- public static const char * getTag()
- private bool isUnderconstrained(const clang::ento::ExplodedNode * N) const
Inherited from BugReporterVisitor:
Inherited from FoldingSetBase::Node:
Methods
¶void Profile(llvm::FoldingSetNodeID& ID) const
void Profile(llvm::FoldingSetNodeID& ID) const
Declared at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:402
Parameters
¶TrackConstraintBRVisitor(
clang::ento::DefinedSVal constraint,
bool assumption)
TrackConstraintBRVisitor(
clang::ento::DefinedSVal constraint,
bool assumption)
Declared at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:398
Parameters
- clang::ento::DefinedSVal constraint
- bool assumption
¶clang::ento::PathDiagnosticPieceRef VisitNode(
const clang::ento::ExplodedNode* N,
clang::ento::BugReporterContext& BRC,
clang::ento::PathSensitiveBugReport& BR)
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/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:408
Parameters
- const clang::ento::ExplodedNode* N
- clang::ento::BugReporterContext& BRC
- clang::ento::PathSensitiveBugReport& BR
¶static const char* getTag()
static const char* getTag()
Description
Return the tag associated with this visitor. This tag will be used to make all PathDiagnosticPieces created by this visitor.
Declared at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:406
¶bool isUnderconstrained(
const clang::ento::ExplodedNode* N) const
bool isUnderconstrained(
const clang::ento::ExplodedNode* N) const
Description
Checks if the constraint is valid in the current state.
Declared at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:414
Parameters
- const clang::ento::ExplodedNode* N