class SuppressInlineDefensiveChecksVisitor
Declaration
class SuppressInlineDefensiveChecksVisitor : 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:564
Inherits from: BugReporterVisitor
Member Variables
- private clang::ento::DefinedSVal V
- The symbolic value for which we are tracking constraints. This value is constrained to null in the end of path.
- private bool IsSatisfied = false
- Track if we found the node where the constraint was first added.
- private bool IsTrackingTurnedOn = false
- Since the visitors can be registered on nodes previous to the last node in the BugReport, but the path traversal always starts with the last node, the visitor invariant (that we start with a node in which V is null) might not hold when node visitation starts. We are going to start tracking from the last node in which the value is null.
Method Overview
- public void Profile(llvm::FoldingSetNodeID & ID) const
- public SuppressInlineDefensiveChecksVisitor(clang::ento::DefinedSVal Val, const clang::ento::ExplodedNode * N)
- public clang::ento::PathDiagnosticPieceRef VisitNode(const clang::ento::ExplodedNode * Succ, clang::ento::BugReporterContext & BRC, clang::ento::PathSensitiveBugReport & BR)
- public static const char * getTag()
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:582
Parameters
¶SuppressInlineDefensiveChecksVisitor(
clang::ento::DefinedSVal Val,
const clang::ento::ExplodedNode* N)
SuppressInlineDefensiveChecksVisitor(
clang::ento::DefinedSVal Val,
const clang::ento::ExplodedNode* N)
Declared at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:580
Parameters
- clang::ento::DefinedSVal Val
- const clang::ento::ExplodedNode* N
¶clang::ento::PathDiagnosticPieceRef VisitNode(
const clang::ento::ExplodedNode* Succ,
clang::ento::BugReporterContext& BRC,
clang::ento::PathSensitiveBugReport& BR)
clang::ento::PathDiagnosticPieceRef VisitNode(
const clang::ento::ExplodedNode* Succ,
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:588
Parameters
- const clang::ento::ExplodedNode* Succ
- 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:586