clang: clang::ProgramPoint Class Reference (original) (raw)
#include "[clang/Analysis/ProgramPoint.h](ProgramPoint%5F8h%5Fsource.html)"
| 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 | |
|---|---|
| std::optional< SourceLocation > | getSourceLocation () const |
| 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. | |
| 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 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 |
| Protected Member Functions | |
|---|---|
| ProgramPoint ()=default | |
| ProgramPoint (const void *P, Kind k, const LocationContext *l, const ProgramPointTag *tag=nullptr, CFGBlock::ConstCFGElementRef ElemRef={nullptr, 0}) | |
| ProgramPoint (const void *P1, const void *P2, Kind k, const LocationContext *l, const ProgramPointTag *tag=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 61 of file ProgramPoint.h.
◆ Kind
| Enumerator |
|---|
| BlockEdgeKind |
| BlockEntranceKind |
| BlockExitKind |
| PreStmtKind |
| PreStmtPurgeDeadSymbolsKind |
| PostStmtPurgeDeadSymbolsKind |
| PostStmtKind |
| PreLoadKind |
| PostLoadKind |
| PreStoreKind |
| PostStoreKind |
| PostConditionKind |
| PostLValueKind |
| PostAllocatorCallKind |
| MinPostStmtKind |
| MaxPostStmtKind |
| PostInitializerKind |
| CallEnterKind |
| CallExitBeginKind |
| CallExitEndKind |
| FunctionExitKind |
| PreImplicitCallKind |
| PostImplicitCallKind |
| MinImplicitCallKind |
| MaxImplicitCallKind |
| LoopExitKind |
| EpsilonKind |
Definition at line 63 of file ProgramPoint.h.
| clang::ProgramPoint::ProgramPoint ( ) | protecteddefault |
|---|
◆ ProgramPoint() [2/3]
◆ ProgramPoint() [3/3]
◆ castAs()
template<typename T>
| T clang::ProgramPoint::castAs ( ) const | inline |
|---|
◆ dump()
| LLVM_DUMP_METHOD void ProgramPoint::dump | ( | ) | const |
|---|
◆ getAs()
template<typename T>
| std::optional< T > clang::ProgramPoint::getAs ( ) const | inline |
|---|
Convert to the specified ProgramPoint type, returning std::nullopt if this ProgramPoint is not of the desired type.
Definition at line 153 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().
◆ getData1()
| const void * clang::ProgramPoint::getData1 ( ) const | inlineprotected |
|---|
Definition at line 127 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::FunctionExitPoint::getStmt(), clang::StmtPoint::getStmt(), Profile(), and withTag().
◆ getData2()
| const void * clang::ProgramPoint::getData2 ( ) const | inlineprotected |
|---|
◆ getElementRef()
◆ getHashValue()
| unsigned clang::ProgramPoint::getHashValue ( ) const | inline |
|---|
◆ getKind()
| Kind clang::ProgramPoint::getKind ( ) const | inline |
|---|
◆ getLocationContext()
| const LocationContext * clang::ProgramPoint::getLocationContext ( ) const | inline |
|---|
Definition at line 181 of file ProgramPoint.h.
Referenced by clang::ento::PathDiagnosticCallPiece::construct(), clang::ento::bugreporter::StoreHandler::constructNote(), clang::ento::PathDiagnosticLocation::create(), clang::FunctionExitPoint::getBlock(), getInlinedLocationContext(), clang::ento::PathSensitiveBugReport::getLocation(), clang::ento::ExplodedNode::getLocationContext(), getStackFrame(), clang::ento::PathSensitiveBugReport::getStmt(), printJson(), Profile(), clang::ento::PathDiagnosticCallPiece::setCallee(), and withTag().
◆ getProgramPoint()
Definition at line 23 of file ProgramPoint.cpp.
References PostLoadKind, PostLValueKind, PostStmtKind, PostStmtPurgeDeadSymbolsKind, PreLoadKind, PreStmtKind, PreStmtPurgeDeadSymbolsKind, PreStoreKind, and ProgramPoint().
Referenced by clang::ento::StmtNodeBuilder::generateNode(), clang::ento::StmtNodeBuilder::generateSink(), and clang::ento::CheckerManager::runCheckersForEvalCall().
◆ getProgramPointKindName()
| StringRef ProgramPoint::getProgramPointKindName ( Kind K) | static |
|---|
Definition at line 52 of file ProgramPoint.cpp.
References BlockEdgeKind, BlockEntranceKind, BlockExitKind, CallEnterKind, CallExitBeginKind, CallExitEndKind, EpsilonKind, FunctionExitKind, LoopExitKind, PostAllocatorCallKind, PostConditionKind, PostImplicitCallKind, PostInitializerKind, PostLoadKind, PostLValueKind, PostStmtKind, PostStmtPurgeDeadSymbolsKind, PostStoreKind, PreImplicitCallKind, PreLoadKind, PreStmtKind, PreStmtPurgeDeadSymbolsKind, and PreStoreKind.
Referenced by timeTraceScopeName().
◆ getSourceLocation()
| std::optional< SourceLocation > ProgramPoint::getSourceLocation | ( | ) | const |
|---|
Definition at line 104 of file ProgramPoint.cpp.
References BlockEdgeKind, BlockEntranceKind, BlockExitKind, CallEnterKind, CallExitBeginKind, CallExitEndKind, castAs(), EpsilonKind, FunctionExitKind, getKind(), clang::Init, LoopExitKind, PostAllocatorCallKind, PostConditionKind, PostImplicitCallKind, PostInitializerKind, PostLoadKind, PostLValueKind, PostStmtKind, PostStmtPurgeDeadSymbolsKind, PostStoreKind, PreImplicitCallKind, PreLoadKind, PreStmtKind, PreStmtPurgeDeadSymbolsKind, PreStoreKind, and clang::T.
◆ getStackFrame()
◆ getTag()
◆ isPurgeKind()
| bool clang::ProgramPoint::isPurgeKind ( ) | inline |
|---|
◆ operator!=()
◆ operator==()
◆ printJson()
| void ProgramPoint::printJson | ( | llvm::raw_ostream & | Out, |
|---|---|---|---|
| const char * | NL = "\n" ) const |
Definition at line 167 of file ProgramPoint.cpp.
References BlockEdgeKind, BlockEntranceKind, BlockExitKind, clang::C, CallEnterKind, CallExitBeginKind, CallExitEndKind, castAs(), EpsilonKind, FunctionExitKind, clang::LocationContext::getAnalysisDeclContext(), getAs(), clang::Decl::getAsFunction(), clang::AnalysisDeclContext::getASTContext(), clang::Stmt::getBeginLoc(), clang::CFGBlock::getBlockID(), clang::ImplicitCallPoint::getDecl(), clang::BlockEdge::getDst(), clang::AnalysisDeclContext::getFunctionName(), clang::Stmt::getID(), getKind(), clang::CFGBlock::getLabel(), clang::QualType::getLocalUnqualifiedType(), clang::ImplicitCallPoint::getLocation(), getLocationContext(), clang::NamedDecl::getQualifiedNameAsString(), clang::BlockEdge::getSrc(), clang::Stmt::getStmtClassName(), clang::CFGBlock::getTerminatorStmt(), clang::Init, clang::isa(), LoopExitKind, PostImplicitCallKind, PostInitializerKind, PreImplicitCallKind, clang::QualType::print(), clang::Stmt::printJson(), clang::printSourceLocationAsJson(), clang::CFGBlock::printTerminatorJson(), SM, and clang::T.
Referenced by dump(), and llvm::DOTGraphTraits< ExplodedGraph * >::getNodeLabel().
◆ Profile()
| void clang::ProgramPoint::Profile ( llvm::FoldingSetNodeID & ID) const | inline |
|---|
◆ setData2()
| void clang::ProgramPoint::setData2 ( const void * d) | inlineprotected |
|---|
◆ withTag()
The documentation for this class was generated from the following files:
- include/clang/Analysis/ProgramPoint.h
- lib/Analysis/ProgramPoint.cpp