clang API Documentation
When a region containing undefined value or '0' value is passed as an argument in a call, marks the call as interesting. More...
#include <BugReporterVisitor.h>
Public Member Functions | |
UndefOrNullArgVisitor (const MemRegion *InR) | |
void | Profile (llvm::FoldingSetNodeID &ID) const override |
PathDiagnosticPiece * | VisitNode (const ExplodedNode *N, const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) override |
Return a diagnostic piece which should be associated with the given node. |
When a region containing undefined value or '0' value is passed as an argument in a call, marks the call as interesting.
As a result, BugReporter will not prune the path through the function even if the region's contents are not modified/accessed by the call.
Definition at line 279 of file BugReporterVisitor.h.
clang::ento::UndefOrNullArgVisitor::UndefOrNullArgVisitor | ( | const MemRegion * | InR | ) | [inline] |
Definition at line 286 of file BugReporterVisitor.h.
void clang::ento::UndefOrNullArgVisitor::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const [inline, override, virtual] |
Implements clang::ento::BugReporterVisitor.
Definition at line 288 of file BugReporterVisitor.h.
PathDiagnosticPiece * UndefOrNullArgVisitor::VisitNode | ( | const ExplodedNode * | Succ, |
const ExplodedNode * | Pred, | ||
BugReporterContext & | BRC, | ||
BugReport & | BR | ||
) | [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 1584 of file BugReporterVisitors.cpp.
References clang::ProgramPoint::getAs(), clang::CallEventManager::getCaller(), clang::ento::ProgramStateManager::getCallEventManager(), clang::ento::ExplodedNode::getLocation(), clang::Type::getPointeeType(), clang::ento::ExplodedNode::getState(), clang::ento::BugReporterContext::getStateManager(), clang::ValueDecl::getType(), clang::Type::isAnyPointerType(), clang::QualType::isConstQualified(), clang::Type::isReferenceType(), clang::ento::MemRegion::isSubRegionOf(), clang::ento::SVal::isUndef(), clang::ento::SVal::isZeroConstant(), clang::ento::BugReport::markInteresting(), State, and clang::ento::MemRegion::StripCasts().