clang
3.9.0
|
BugReporterVisitors are used to add custom diagnostics along a path. More...
#include <BugReporterVisitor.h>
Public Member Functions | |
BugReporterVisitor ()=default | |
BugReporterVisitor (const BugReporterVisitor &)=default | |
BugReporterVisitor (BugReporterVisitor &&) | |
virtual | ~BugReporterVisitor () |
virtual std::unique_ptr < BugReporterVisitor > | clone () const =0 |
Returns a copy of this BugReporter. More... | |
virtual PathDiagnosticPiece * | VisitNode (const ExplodedNode *Succ, const ExplodedNode *Pred, BugReporterContext &BRC, BugReport &BR)=0 |
Return a diagnostic piece which should be associated with the given node. More... | |
virtual std::unique_ptr < PathDiagnosticPiece > | getEndPath (BugReporterContext &BRC, const ExplodedNode *N, BugReport &BR) |
Provide custom definition for the final diagnostic piece on the path - the piece, which is displayed before the path is expanded. More... | |
virtual void | Profile (llvm::FoldingSetNodeID &ID) const =0 |
Static Public Member Functions | |
static std::unique_ptr < PathDiagnosticPiece > | getDefaultEndPath (BugReporterContext &BRC, const ExplodedNode *N, BugReport &BR) |
Generates the default final diagnostic piece. More... | |
BugReporterVisitors are used to add custom diagnostics along a path.
Custom visitors should subclass the BugReporterVisitorImpl class for a default implementation of the clone() method. (Warning: if you have a deep subclass of BugReporterVisitorImpl, the default implementation of clone() will NOT do the right thing, and you will have to provide your own implementation.)
Definition at line 39 of file BugReporterVisitor.h.
|
default |
|
default |
|
inline |
Definition at line 43 of file BugReporterVisitor.h.
|
virtual |
Definition at line 49 of file BugReporter.cpp.
|
pure virtual |
Returns a copy of this BugReporter.
Custom BugReporterVisitors should not override this method directly. Instead, they should inherit from BugReporterVisitorImpl and provide a protected or public copy constructor.
(Warning: if you have a deep subclass of BugReporterVisitorImpl, the default implementation of clone() will NOT do the right thing, and you will have to provide your own implementation.)
|
static |
Generates the default final diagnostic piece.
Definition at line 110 of file BugReporterVisitors.cpp.
References clang::ento::PathDiagnosticLocation::createEndOfPath(), clang::ento::BugReport::getDescription(), clang::ento::BugReport::getRanges(), clang::ento::BugReporterContext::getSourceManager(), and P.
Referenced by clang::ento::GRBugReporter::generatePathDiagnostic().
|
virtual |
Provide custom definition for the final diagnostic piece on the path - the piece, which is displayed before the path is expanded.
If returns NULL the default implementation will be used. Also note that at most one visitor of a BugReport should generate a non-NULL end of path diagnostic piece.
Reimplemented in clang::ento::LikelyFalsePositiveSuppressionBRVisitor.
Definition at line 105 of file BugReporterVisitors.cpp.
|
pure virtual |
Implemented in clang::ento::SuppressInlineDefensiveChecksVisitor, clang::ento::UndefOrNullArgVisitor, clang::ento::LikelyFalsePositiveSuppressionBRVisitor, clang::ento::ConditionBRVisitor, clang::ento::NilReceiverBRVisitor, clang::ento::TrackConstraintBRVisitor, and clang::ento::FindLastStoreBRVisitor.
|
pure virtual |
Return a diagnostic piece which should be associated with the given node.
The last parameter can be used to register a new visitor with the given BugReport while processing a node.
Implemented in clang::ento::SuppressInlineDefensiveChecksVisitor, clang::ento::UndefOrNullArgVisitor, clang::ento::LikelyFalsePositiveSuppressionBRVisitor, clang::ento::ConditionBRVisitor, clang::ento::NilReceiverBRVisitor, clang::ento::TrackConstraintBRVisitor, and clang::ento::FindLastStoreBRVisitor.