|
clang 24.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 , LifetimeEndKind , EpsilonKind } |
Public Member Functions | |
| std::optional< SourceLocation > | getSourceLocation () const |
| ProgramPoint | withTag (const ProgramPointTag *NewTag) const |
| Create a new ProgramPoint object that is the same as the original except for using the specified tag value. | |
| template<typename T> | |
| T | castAs () const |
| Convert to the specified ProgramPoint type, asserting that this ProgramPoint is of the desired type. | |
| template<typename T> | |
| std::optional< T > | getAs () const |
| Convert to the specified ProgramPoint type, returning std::nullopt 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 StackFrame * | 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 StringRef | getProgramPointKindName (Kind K) |
| static ProgramPoint | getProgramPoint (const Stmt *S, ProgramPoint::Kind K, const StackFrame *SF, const ProgramPointTag *tag) |
Protected Member Functions | |
| ProgramPoint ()=default | |
| ProgramPoint (const void *P, Kind K, const StackFrame *SF, const ProgramPointTag *T=nullptr, CFGBlock::ConstCFGElementRef ElemRef={nullptr, 0}) | |
| ProgramPoint (const void *P1, const void *P2, Kind K, const StackFrame *SF, const ProgramPointTag *T=nullptr, CFGBlock::ConstCFGElementRef ElemRef={nullptr, 0}) | |
| const void * | getData1 () const |
| const void * | getData2 () const |
| void | setData2 (const void *d) |
| CFGBlock::ConstCFGElementRef | getElementRef () const |
Definition at line 60 of file ProgramPoint.h.
Definition at line 62 of file ProgramPoint.h.
|
protecteddefault |
Referenced by castAs(), getAs(), getProgramPoint(), operator!=(), operator==(), and withTag().
|
inlineprotected |
Definition at line 110 of file ProgramPoint.h.
References clang::T.
|
inlineprotected |
Definition at line 115 of file ProgramPoint.h.
References clang::T.
Convert to the specified ProgramPoint type, asserting that this ProgramPoint is of the desired type.
Definition at line 144 of file ProgramPoint.h.
References ProgramPoint(), and clang::T.
Referenced by clang::ento::StackHintGeneratorForSymbol::getMessage(), getSourceLocation(), printJson(), REGISTER_TRAIT_WITH_PROGRAMSTATE(), clang::ento::ExprEngine::VisitLogicalExpr(), and clang::ento::retaincountchecker::RefCountReportVisitor::VisitNode().
| LLVM_DUMP_METHOD void ProgramPoint::dump | ( | ) | const |
Definition at line 48 of file ProgramPoint.cpp.
References printJson().
Convert to the specified ProgramPoint type, returning std::nullopt if this ProgramPoint is not of the desired type.
Definition at line 154 of file ProgramPoint.h.
References ProgramPoint(), and clang::T.
Referenced by alreadyExecutedAtLeastOneLoopIteration(), clang::ento::bugreporter::StoreHandler::constructNote(), clang::ento::PathDiagnosticLocation::create(), clang::ento::CoreEngine::enqueueStmtNode(), exitingDestructor(), GetAllocationSite(), clang::ento::ExplodedNode::getCFGBlock(), getLastStmt(), clang::ento::PathSensitiveBugReport::getLocation(), clang::ento::CheckerContext::getLocationRegionIfPostStore(), clang::ento::PathSensitiveBugReport::getStmt(), getStmtBeforeCond(), clang::ento::ExplodedNode::getStmtForDiagnostics(), clang::ento::madeNewBranch(), peelOffOuterExpr(), printJson(), REGISTER_TRAIT_WITH_PROGRAMSTATE(), shouldRemoveDeadBindings(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::retaincountchecker::RefCountReportVisitor::VisitNode(), clang::ento::SuppressInlineDefensiveChecksVisitor::VisitNode(), clang::ento::UndefOrNullArgVisitor::VisitNode(), and clang::ento::ConditionBRVisitor::VisitNodeImpl().
|
inlineprotected |
Definition at line 128 of file ProgramPoint.h.
Referenced by clang::BlockEntrance::getBlock(), clang::BlockExit::getBlock(), clang::CallExitEnd::getCalleeStackFrame(), clang::CallEnter::getCallExpr(), clang::EpsilonPoint::getData(), clang::PostInitializer::getInitializer(), clang::ImplicitCallPoint::getLocation(), clang::LoopExit::getLoopStmt(), clang::CallExitBegin::getReturnStmt(), clang::BlockEdge::getSrc(), clang::FunctionExitPoint::getStmt(), clang::StmtPoint::getStmt(), clang::LifetimeEnd::getTriggerStmt(), Profile(), and withTag().
|
inlineprotected |
Definition at line 129 of file ProgramPoint.h.
Referenced by clang::CallEnter::getCalleeStackFrame(), clang::ImplicitCallPoint::getDecl(), clang::LifetimeEnd::getDecl(), clang::BlockEdge::getDst(), clang::PostInitializer::getLocationValue(), clang::PostStore::getLocationValue(), clang::BlockEntrance::getPreviousBlock(), clang::PreStmt::getSubStmt(), clang::PostStore::PostStore(), Profile(), and withTag().
|
inlineprotected |
Definition at line 131 of file ProgramPoint.h.
Referenced by withTag().
|
inline |
Definition at line 185 of file ProgramPoint.h.
References Profile().
Referenced by llvm::DenseMapInfo< clang::ProgramPoint >::getHashValue().
|
inline |
Definition at line 163 of file ProgramPoint.h.
Referenced by clang::ento::WorkList::enqueue(), getSourceLocation(), isPurgeKind(), printJson(), Profile(), and withTag().
|
static |
Definition at line 23 of file ProgramPoint.cpp.
References PostLoadKind, PostLValueKind, PostStmtKind, PostStmtPurgeDeadSymbolsKind, PreLoadKind, PreStmtKind, PreStmtPurgeDeadSymbolsKind, PreStoreKind, and ProgramPoint().
Referenced by clang::ento::CoreEngine::makeNodeWithBinding(), clang::ento::ExprEngine::removeDead(), and clang::ento::CheckerManager::runCheckersForEvalCall().
|
static |
Definition at line 52 of file ProgramPoint.cpp.
References BlockEdgeKind, BlockEntranceKind, BlockExitKind, CallEnterKind, CallExitBeginKind, CallExitEndKind, EpsilonKind, FunctionExitKind, LifetimeEndKind, LoopExitKind, PostAllocatorCallKind, PostConditionKind, PostImplicitCallKind, PostInitializerKind, PostLoadKind, PostLValueKind, PostStmtKind, PostStmtPurgeDeadSymbolsKind, PostStoreKind, PreImplicitCallKind, PreLoadKind, PreStmtKind, PreStmtPurgeDeadSymbolsKind, and PreStoreKind.
Referenced by timeTraceScopeName().
| std::optional< SourceLocation > ProgramPoint::getSourceLocation | ( | ) | const |
Definition at line 106 of file ProgramPoint.cpp.
References BlockEdgeKind, BlockEntranceKind, BlockExitKind, CallEnterKind, CallExitBeginKind, CallExitEndKind, castAs(), EpsilonKind, FunctionExitKind, getKind(), clang::Init, LifetimeEndKind, LoopExitKind, PostAllocatorCallKind, PostConditionKind, PostImplicitCallKind, PostInitializerKind, PostLoadKind, PostLValueKind, PostStmtKind, PostStmtPurgeDeadSymbolsKind, PostStoreKind, PreImplicitCallKind, PreLoadKind, PreStmtKind, PreStmtPurgeDeadSymbolsKind, PreStoreKind, and clang::T.
|
inline |
Definition at line 182 of file ProgramPoint.h.
Referenced by clang::ento::PathDiagnosticCallPiece::construct(), clang::ento::bugreporter::StoreHandler::constructNote(), clang::ento::PathDiagnosticLocation::create(), clang::FunctionExitPoint::getBlock(), getLastStmt(), clang::ento::PathSensitiveBugReport::getLocation(), clang::ento::ExplodedNode::getStackFrame(), clang::ento::PathSensitiveBugReport::getStmt(), printJson(), Profile(), clang::ento::PathDiagnosticCallPiece::setCallee(), and withTag().
|
inline |
Definition at line 180 of file ProgramPoint.h.
Referenced by llvm::DOTGraphTraits< ExplodedGraph * >::getNodeLabel(), Profile(), clang::ento::retaincountchecker::RefCountReportVisitor::VisitNode(), clang::ento::TagVisitor::VisitNode(), clang::ento::TrackConstraintBRVisitor::VisitNode(), and clang::ento::ConditionBRVisitor::VisitNodeImpl().
|
inline |
Is this a program point corresponding to purge/removal of dead symbols and bindings.
Definition at line 174 of file ProgramPoint.h.
References getKind(), PostStmtPurgeDeadSymbolsKind, and PreStmtPurgeDeadSymbolsKind.
Referenced by clang::ento::ExplodedNode::getNextStmtForDiagnostics().
|
inline |
Definition at line 196 of file ProgramPoint.h.
References ProgramPoint().
|
inline |
Definition at line 191 of file ProgramPoint.h.
References ProgramPoint().
| void ProgramPoint::printJson | ( | llvm::raw_ostream & | Out, |
| const char * | NL = "\n" ) const |
Definition at line 173 of file ProgramPoint.cpp.
References BlockEdgeKind, BlockEntranceKind, BlockExitKind, clang::C, CallEnterKind, CallExitBeginKind, CallExitEndKind, castAs(), EpsilonKind, FunctionExitKind, clang::StackFrame::getAnalysisDeclContext(), getAs(), clang::Decl::getAsFunction(), clang::AnalysisDeclContext::getASTContext(), clang::CFGBlock::getBlockID(), clang::ImplicitCallPoint::getDecl(), clang::BlockEdge::getDst(), clang::AnalysisDeclContext::getFunctionName(), getKind(), clang::CFGBlock::getLabel(), clang::QualType::getLocalUnqualifiedType(), clang::ImplicitCallPoint::getLocation(), clang::NamedDecl::getQualifiedNameAsString(), clang::BlockEdge::getSrc(), getStackFrame(), clang::CFGBlock::getTerminatorStmt(), clang::Init, clang::isa(), LifetimeEndKind, LoopExitKind, PostImplicitCallKind, PostInitializerKind, PreImplicitCallKind, clang::QualType::print(), clang::printSourceLocationAsJson(), clang::CFGBlock::printTerminatorJson(), and clang::T.
Referenced by dump(), and llvm::DOTGraphTraits< ExplodedGraph * >::getNodeLabel().
|
inline |
Definition at line 201 of file ProgramPoint.h.
References getData1(), getData2(), getKind(), getStackFrame(), and getTag().
Referenced by getHashValue().
|
inlineprotected |
Definition at line 130 of file ProgramPoint.h.
Referenced by clang::PostStore::PostStore().
|
inline |
Create a new ProgramPoint object that is the same as the original except for using the specified tag value.
Definition at line 136 of file ProgramPoint.h.
References getData1(), getData2(), getElementRef(), getKind(), getStackFrame(), clang::NewTag, and ProgramPoint().
Referenced by clang::ento::CoreEngine::enqueueStmtNode(), clang::ento::ExprEngine::processCFGBlockEntrance(), and clang::ento::ExprEngine::VisitCXXDestructor().