clang
15.0.0git
|
#include "clang/Analysis/ProgramPoint.h"
Public Types | |
enum | Kind { BlockEdgeKind, BlockEntranceKind, BlockExitKind, PreStmtKind, PreStmtPurgeDeadSymbolsKind, PostStmtPurgeDeadSymbolsKind, PostStmtKind, PreLoadKind, PostLoadKind, PreStoreKind, PostStoreKind, PostConditionKind, PostLValueKind, PostAllocatorCallKind, MinPostStmtKind = PostStmtKind, MaxPostStmtKind = PostAllocatorCallKind, PostInitializerKind, CallEnterKind, CallExitBeginKind, CallExitEndKind, FunctionExitKind, PreImplicitCallKind, PostImplicitCallKind, MinImplicitCallKind = PreImplicitCallKind, MaxImplicitCallKind = PostImplicitCallKind, LoopExitKind, EpsilonKind } |
Public Member Functions | |
ProgramPoint | withTag (const ProgramPointTag *tag) const |
Create a new ProgramPoint object that is the same as the original except for using the specified tag value. More... | |
template<typename T > | |
T | castAs () const |
Convert to the specified ProgramPoint type, asserting that this ProgramPoint is of the desired type. More... | |
template<typename T > | |
Optional< T > | getAs () const |
Convert to the specified ProgramPoint type, returning None if this ProgramPoint is not of the desired type. More... | |
Kind | getKind () const |
bool | isPurgeKind () |
Is this a program point corresponding to purge/removal of dead symbols and bindings. More... | |
const ProgramPointTag * | getTag () const |
const LocationContext * | getLocationContext () const |
const StackFrameContext * | getStackFrame () const |
unsigned | getHashValue () const |
bool | operator== (const ProgramPoint &RHS) const |
bool | operator!= (const ProgramPoint &RHS) const |
void | Profile (llvm::FoldingSetNodeID &ID) const |
void | printJson (llvm::raw_ostream &Out, const char *NL="\n") const |
LLVM_DUMP_METHOD void | dump () const |
Static Public Member Functions | |
static ProgramPoint | getProgramPoint (const Stmt *S, ProgramPoint::Kind K, const LocationContext *LC, const ProgramPointTag *tag) |
Protected Member Functions | |
ProgramPoint ()=default | |
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 58 of file ProgramPoint.h.
Definition at line 60 of file ProgramPoint.h.
|
protecteddefault |
Referenced by withTag().
|
inlineprotected |
Definition at line 100 of file ProgramPoint.h.
References getData1(), getKind(), getLocationContext(), and P.
|
inlineprotected |
Definition at line 113 of file ProgramPoint.h.
|
inline |
Convert to the specified ProgramPoint type, asserting that this ProgramPoint is of the desired type.
Definition at line 139 of file ProgramPoint.h.
Referenced by clang::ento::ExprEngine::VisitGuardedExpr(), and clang::ento::ExprEngine::VisitLogicalExpr().
LLVM_DUMP_METHOD void ProgramPoint::dump | ( | ) | const |
Definition at line 47 of file ProgramPoint.cpp.
References printJson().
|
inline |
Convert to the specified ProgramPoint type, returning None if this ProgramPoint is not of the desired type.
Definition at line 150 of file ProgramPoint.h.
Referenced by clang::ento::CoreEngine::enqueueStmtNode(), GetAllocationSite(), clang::ento::CheckerContext::getLocationRegionIfPostStore(), peelOffOuterExpr(), clang::ento::ExprEngine::VisitGuardedExpr(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::retaincountchecker::RefCountReportVisitor::VisitNode(), clang::ento::UndefOrNullArgVisitor::VisitNode(), clang::ento::SuppressInlineDefensiveChecksVisitor::VisitNode(), and clang::ento::ConditionBRVisitor::VisitNodeImpl().
|
inlineprotected |
Definition at line 124 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::LoopExit::getLoopStmt(), clang::CallExitBegin::getReturnStmt(), clang::BlockEdge::getSrc(), clang::StmtPoint::getStmt(), clang::FunctionExitPoint::getStmt(), Profile(), ProgramPoint(), and withTag().
|
inlineprotected |
Definition at line 125 of file ProgramPoint.h.
Referenced by clang::CallEnter::getCalleeContext(), clang::ImplicitCallPoint::getDecl(), clang::BlockEdge::getDst(), clang::PostStore::getLocationValue(), clang::PostInitializer::getLocationValue(), clang::PreStmt::getSubStmt(), Profile(), and withTag().
|
inline |
Definition at line 187 of file ProgramPoint.h.
References Profile().
Referenced by llvm::DenseMapInfo< clang::ProgramPoint >::getHashValue().
|
inline |
Definition at line 159 of file ProgramPoint.h.
References x.
Referenced by clang::ento::WorkList::enqueue(), isPurgeKind(), Profile(), ProgramPoint(), and withTag().
|
inline |
Definition at line 178 of file ProgramPoint.h.
Referenced by clang::ento::PathDiagnosticCallPiece::construct(), clang::FunctionExitPoint::getBlock(), clang::ento::ExplodedNode::getLocationContext(), getStackFrame(), clang::ento::ExprEngine::processCFGBlockEntrance(), Profile(), ProgramPoint(), clang::ento::PathDiagnosticCallPiece::setCallee(), and withTag().
|
static |
Definition at line 22 of file ProgramPoint.cpp.
Referenced by clang::ento::CheckerManager::runCheckersForEvalCall().
|
inline |
Definition at line 182 of file ProgramPoint.h.
References getLocationContext(), and clang::LocationContext::getStackFrame().
Referenced by clang::ento::ExplodedNode::getStackFrame().
|
inline |
Definition at line 176 of file ProgramPoint.h.
Referenced by clang::ento::CheckerContext::generateErrorNode(), clang::ento::CheckerContext::generateNonFatalErrorNode(), Profile(), clang::ento::TagVisitor::VisitNode(), clang::ento::ConditionBRVisitor::VisitNodeImpl(), and clang::ento::ExprEngine::VisitObjCMessage().
|
inline |
Is this a program point corresponding to purge/removal of dead symbols and bindings.
Definition at line 170 of file ProgramPoint.h.
References getKind(), PostStmtPurgeDeadSymbolsKind, and PreStmtPurgeDeadSymbolsKind.
|
inline |
Definition at line 200 of file ProgramPoint.h.
|
inline |
Definition at line 193 of file ProgramPoint.h.
void ProgramPoint::printJson | ( | llvm::raw_ostream & | Out, |
const char * | NL = "\n" |
||
) | const |
Definition at line 51 of file ProgramPoint.cpp.
Referenced by dump().
|
inline |
Definition at line 207 of file ProgramPoint.h.
References getData1(), getData2(), getKind(), getLocationContext(), and getTag().
Referenced by getHashValue().
|
inlineprotected |
Definition at line 126 of file ProgramPoint.h.
|
inline |
Create a new ProgramPoint object that is the same as the original except for using the specified tag value.
Definition at line 131 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().