clang API Documentation
#include <ProgramPoint.h>
Public Types | |
enum | Kind { BlockEdgeKind, BlockEntranceKind, BlockExitKind, PreStmtKind, PreStmtPurgeDeadSymbolsKind, PostStmtPurgeDeadSymbolsKind, PostStmtKind, PreLoadKind, PostLoadKind, PreStoreKind, PostStoreKind, PostConditionKind, PostLValueKind, MinPostStmtKind = PostStmtKind, MaxPostStmtKind = PostLValueKind, PostInitializerKind, CallEnterKind, CallExitBeginKind, CallExitEndKind, PreImplicitCallKind, PostImplicitCallKind, MinImplicitCallKind = PreImplicitCallKind, MaxImplicitCallKind = PostImplicitCallKind, EpsilonKind } |
Public Member Functions | |
ProgramPoint | withTag (const ProgramPointTag *tag) const |
template<typename T > | |
T | castAs () const |
Convert to the specified ProgramPoint type, asserting that this ProgramPoint is of the desired type. | |
template<typename T > | |
Optional< T > | getAs () const |
Convert to the specified ProgramPoint type, returning None if this ProgramPoint is not of the desired type. | |
Kind | getKind () const |
bool | isPurgeKind () |
Is this a program point corresponding to purge/removal of dead symbols and bindings. | |
const ProgramPointTag * | getTag () const |
const LocationContext * | getLocationContext () const |
unsigned | getHashValue () const |
bool | operator== (const ProgramPoint &RHS) const |
bool | operator!= (const ProgramPoint &RHS) const |
void | Profile (llvm::FoldingSetNodeID &ID) const |
Static Public Member Functions | |
static ProgramPoint | getProgramPoint (const Stmt *S, ProgramPoint::Kind K, const LocationContext *LC, const ProgramPointTag *tag) |
Protected Member Functions | |
ProgramPoint () | |
ProgramPoint (const void *P, Kind k, const LocationContext *l, const ProgramPointTag *tag=nullptr) | |
ProgramPoint (const void *P1, const void *P2, Kind k, const LocationContext *l, const ProgramPointTag *tag=nullptr) | |
const void * | getData1 () const |
const void * | getData2 () const |
void | setData2 (const void *d) |
Definition at line 38 of file ProgramPoint.h.
Definition at line 40 of file ProgramPoint.h.
clang::ProgramPoint::ProgramPoint | ( | ) | [inline, protected] |
Definition at line 76 of file ProgramPoint.h.
Referenced by withTag().
clang::ProgramPoint::ProgramPoint | ( | const void * | P, |
Kind | k, | ||
const LocationContext * | l, | ||
const ProgramPointTag * | tag = nullptr |
||
) | [inline, protected] |
Definition at line 77 of file ProgramPoint.h.
References getData1(), getKind(), and getLocationContext().
clang::ProgramPoint::ProgramPoint | ( | const void * | P1, |
const void * | P2, | ||
Kind | k, | ||
const LocationContext * | l, | ||
const ProgramPointTag * | tag = nullptr |
||
) | [inline, protected] |
Definition at line 90 of file ProgramPoint.h.
T clang::ProgramPoint::castAs | ( | ) | const [inline] |
Convert to the specified ProgramPoint type, asserting that this ProgramPoint is of the desired type.
Definition at line 116 of file ProgramPoint.h.
Referenced by clang::ento::CoreEngine::dispatchWorkItem(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), clang::ento::StackHintGeneratorForSymbol::getMessage(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), clang::ento::ExprEngine::VisitGuardedExpr(), clang::ento::ExprEngine::VisitLogicalExpr(), and wasSynthesizedProperty().
Optional<T> clang::ProgramPoint::getAs | ( | ) | const [inline] |
Convert to the specified ProgramPoint type, returning None if this ProgramPoint is not of the desired type.
Definition at line 127 of file ProgramPoint.h.
Referenced by alreadyExecutedAtLeastOneLoopIteration(), clang::ento::PathDiagnosticLocation::create(), clang::ento::PathDiagnosticLocation::createEndOfPath(), clang::ento::CoreEngine::dispatchWorkItem(), clang::ento::CoreEngine::enqueueStmtNode(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), GenerateAlternateExtensivePathDiagnostic(), GenerateExtensivePathDiagnostic(), GenerateMinimalPathDiagnostic(), GetAllocationSite(), getLastStmt(), clang::ento::ExplodedNode::getLocationAs(), clang::ento::CheckerContext::getLocationRegionIfPostStore(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), clang::ento::BugReport::getStmt(), clang::ento::PathDiagnosticLocation::getStmt(), getStmtBeforeCond(), peelOffOuterExpr(), shouldRemoveDeadBindings(), clang::ento::bugreporter::trackNullOrUndefValue(), clang::ento::ExprEngine::VisitGuardedExpr(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::FindLastStoreBRVisitor::VisitNode(), clang::ento::UndefOrNullArgVisitor::VisitNode(), and clang::ento::ConditionBRVisitor::VisitNodeImpl().
const void* clang::ProgramPoint::getData1 | ( | ) | const [inline, protected] |
Definition at line 101 of file ProgramPoint.h.
Referenced by clang::BlockEntrance::getBlock(), clang::BlockExit::getBlock(), clang::CallExitEnd::getCalleeContext(), clang::CallEnter::getCallExpr(), clang::EpsilonPoint::getData(), clang::PostInitializer::getInitializer(), clang::ImplicitCallPoint::getLocation(), clang::BlockEdge::getSrc(), clang::StmtPoint::getStmt(), Profile(), ProgramPoint(), and withTag().
const void* clang::ProgramPoint::getData2 | ( | ) | const [inline, protected] |
Definition at line 102 of file ProgramPoint.h.
Referenced by clang::CallEnter::getCalleeContext(), clang::ImplicitCallPoint::getDecl(), clang::BlockEdge::getDst(), clang::PostStore::getLocationValue(), clang::PostInitializer::getLocationValue(), clang::PreStmt::getSubStmt(), clang::PostStore::PostStore(), Profile(), and withTag().
unsigned clang::ProgramPoint::getHashValue | ( | ) | const [inline] |
Definition at line 160 of file ProgramPoint.h.
References Profile().
Referenced by llvm::DenseMapInfo< clang::ProgramPoint >::getHashValue().
Kind clang::ProgramPoint::getKind | ( | ) | const [inline] |
Definition at line 136 of file ProgramPoint.h.
Referenced by clang::ento::CoreEngine::dispatchWorkItem(), clang::ento::WorkList::enqueue(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), isPurgeKind(), Profile(), ProgramPoint(), and withTag().
const LocationContext* clang::ProgramPoint::getLocationContext | ( | ) | const [inline] |
Definition at line 155 of file ProgramPoint.h.
Referenced by clang::ento::PathDiagnosticCallPiece::construct(), clang::ento::PathDiagnosticLocation::create(), getLastStmt(), clang::ento::ExplodedNode::getLocationContext(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), clang::ento::BugReport::getStmt(), clang::ento::ExprEngine::processCFGBlockEntrance(), Profile(), ProgramPoint(), clang::ento::PathDiagnosticCallPiece::setCallee(), clang::ento::FindLastStoreBRVisitor::VisitNode(), and withTag().
ProgramPoint ProgramPoint::getProgramPoint | ( | const Stmt * | S, |
ProgramPoint::Kind | K, | ||
const LocationContext * | LC, | ||
const ProgramPointTag * | tag | ||
) | [static] |
Definition at line 21 of file ProgramPoint.cpp.
References PostLoadKind, PostLValueKind, PostStmtKind, PostStmtPurgeDeadSymbolsKind, PreLoadKind, PreStmtKind, PreStmtPurgeDeadSymbolsKind, and PreStoreKind.
Referenced by clang::ento::StmtNodeBuilder::generateNode(), clang::ento::StmtNodeBuilder::generateSink(), and clang::ento::CheckerManager::runCheckersForEvalCall().
const ProgramPointTag* clang::ProgramPoint::getTag | ( | ) | const [inline] |
Definition at line 153 of file ProgramPoint.h.
Referenced by llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), and Profile().
bool clang::ProgramPoint::isPurgeKind | ( | ) | [inline] |
Is this a program point corresponding to purge/removal of dead symbols and bindings.
Definition at line 147 of file ProgramPoint.h.
References getKind(), PostStmtPurgeDeadSymbolsKind, and PreStmtPurgeDeadSymbolsKind.
bool clang::ProgramPoint::operator!= | ( | const ProgramPoint & | RHS | ) | const [inline] |
Definition at line 173 of file ProgramPoint.h.
bool clang::ProgramPoint::operator== | ( | const ProgramPoint & | RHS | ) | const [inline] |
Definition at line 166 of file ProgramPoint.h.
void clang::ProgramPoint::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const [inline] |
Definition at line 180 of file ProgramPoint.h.
References getData1(), getData2(), getKind(), getLocationContext(), and getTag().
Referenced by getHashValue().
void clang::ProgramPoint::setData2 | ( | const void * | d | ) | [inline, protected] |
Definition at line 103 of file ProgramPoint.h.
Referenced by clang::PostStore::PostStore().
ProgramPoint clang::ProgramPoint::withTag | ( | const ProgramPointTag * | tag | ) | const [inline] |
Create a new ProgramPoint object that is the same as the original except for using the specified tag value.
Definition at line 108 of file ProgramPoint.h.
References getData1(), getData2(), getKind(), getLocationContext(), and ProgramPoint().
Referenced by clang::ento::CoreEngine::enqueueStmtNode(), clang::ento::NodeBuilderWithSinks::generateNode(), and clang::ento::NodeBuilderWithSinks::generateSink().