clang API Documentation
Suppress reports that might lead to known false positives. More...
#include <BugReporterVisitor.h>
Public Member Functions | |
void | Profile (llvm::FoldingSetNodeID &ID) const override |
PathDiagnosticPiece * | VisitNode (const ExplodedNode *N, const ExplodedNode *Prev, BugReporterContext &BRC, BugReport &BR) override |
Return a diagnostic piece which should be associated with the given node. | |
std::unique_ptr < PathDiagnosticPiece > | getEndPath (BugReporterContext &BRC, const ExplodedNode *N, BugReport &BR) override |
Provide custom definition for the final diagnostic piece on the path - the piece, which is displayed before the path is expanded. | |
Static Public Member Functions | |
static void * | getTag () |
Suppress reports that might lead to known false positives.
Currently this suppresses reports based on locations of bugs.
Definition at line 250 of file BugReporterVisitor.h.
std::unique_ptr< PathDiagnosticPiece > LikelyFalsePositiveSuppressionBRVisitor::getEndPath | ( | BugReporterContext & | BRC, |
const ExplodedNode * | N, | ||
BugReport & | BR | ||
) | [override, 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 from clang::ento::BugReporterVisitor.
Definition at line 1514 of file BugReporterVisitors.cpp.
References clang::ento::PathDiagnosticLocation::asLocation(), clang::ento::ExprEngine::getAnalysisManager(), clang::ento::BugReporterContext::getBugReporter(), clang::LocationContext::getDecl(), clang::ento::GRBugReporter::getEngine(), clang::SourceManager::getFilename(), clang::ento::BugReport::getLocation(), clang::ento::ExplodedNode::getLocationContext(), clang::NamedDecl::getName(), clang::LocationContext::getParent(), clang::DeclContext::getParent(), clang::CXXMethodDecl::getParent(), clang::ento::BugReporterContext::getSourceManager(), clang::FullSourceLoc::getSpellingLoc(), getTag(), isInStdNamespace(), clang::SourceLocation::isMacroID(), clang::ento::BugReport::markInvalid(), clang::ento::AnalysisManager::options, clang::AnalyzerOptions::shouldSuppressFromCXXStandardLibrary(), and SM.
static void* clang::ento::LikelyFalsePositiveSuppressionBRVisitor::getTag | ( | ) | [inline, static] |
Definition at line 253 of file BugReporterVisitor.h.
Referenced by getEndPath(), and Profile().
void clang::ento::LikelyFalsePositiveSuppressionBRVisitor::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const [inline, override, virtual] |
Implements clang::ento::BugReporterVisitor.
Definition at line 258 of file BugReporterVisitor.h.
References getTag().
PathDiagnosticPiece* clang::ento::LikelyFalsePositiveSuppressionBRVisitor::VisitNode | ( | const ExplodedNode * | Succ, |
const ExplodedNode * | Pred, | ||
BugReporterContext & | BRC, | ||
BugReport & | BR | ||
) | [inline, override, 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.
Implements clang::ento::BugReporterVisitor.
Definition at line 262 of file BugReporterVisitor.h.