clang 22.0.0git
clang::ProgramPoint Class Reference

#include "clang/Analysis/ProgramPoint.h"

Inheritance diagram for clang::ProgramPoint:
[legend]

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< SourceLocationgetSourceLocation () 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< TgetAs () 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 ProgramPointTaggetTag () const
const LocationContextgetLocationContext () const
const StackFrameContextgetStackFrame () 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 LocationContext *LC, const ProgramPointTag *tag)

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

Detailed Description

Definition at line 61 of file ProgramPoint.h.

Member Enumeration Documentation

◆ 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.

Constructor & Destructor Documentation

◆ ProgramPoint() [1/3]

clang::ProgramPoint::ProgramPoint ( )
protecteddefault

◆ ProgramPoint() [2/3]

clang::ProgramPoint::ProgramPoint ( const void * P,
Kind k,
const LocationContext * l,
const ProgramPointTag * tag = nullptr,
CFGBlock::ConstCFGElementRef ElemRef = {nullptr, 0} )
inlineprotected

Definition at line 108 of file ProgramPoint.h.

◆ ProgramPoint() [3/3]

clang::ProgramPoint::ProgramPoint ( const void * P1,
const void * P2,
Kind k,
const LocationContext * l,
const ProgramPointTag * tag = nullptr,
CFGBlock::ConstCFGElementRef ElemRef = {nullptr, 0} )
inlineprotected

Definition at line 119 of file ProgramPoint.h.

Member Function Documentation

◆ castAs()

template<typename T>
T clang::ProgramPoint::castAs ( ) const
inline

◆ dump()

LLVM_DUMP_METHOD void ProgramPoint::dump ( ) const

Definition at line 48 of file ProgramPoint.cpp.

References printJson().

◆ getAs()

◆ getData1()

◆ getData2()

◆ getElementRef()

CFGBlock::ConstCFGElementRef clang::ProgramPoint::getElementRef ( ) const
inlineprotected

Definition at line 130 of file ProgramPoint.h.

◆ getHashValue()

unsigned clang::ProgramPoint::getHashValue ( ) const
inline

Definition at line 190 of file ProgramPoint.h.

References Profile().

Referenced by llvm::DenseMapInfo< clang::ProgramPoint >::getHashValue().

◆ getKind()

Kind clang::ProgramPoint::getKind ( ) const
inline

◆ getLocationContext()

◆ getProgramPoint()

◆ getProgramPointKindName()

◆ getSourceLocation()

◆ getStackFrame()

const StackFrameContext * clang::ProgramPoint::getStackFrame ( ) const
inline

◆ getTag()

◆ isPurgeKind()

bool clang::ProgramPoint::isPurgeKind ( )
inline

Is this a program point corresponding to purge/removal of dead symbols and bindings.

Definition at line 173 of file ProgramPoint.h.

References getKind(), PostStmtPurgeDeadSymbolsKind, and PreStmtPurgeDeadSymbolsKind.

Referenced by clang::ento::ExplodedNode::getNextStmtForDiagnostics().

◆ operator!=()

bool clang::ProgramPoint::operator!= ( const ProgramPoint & RHS) const
inline

Definition at line 201 of file ProgramPoint.h.

References ProgramPoint().

◆ operator==()

bool clang::ProgramPoint::operator== ( const ProgramPoint & RHS) const
inline

Definition at line 196 of file ProgramPoint.h.

References ProgramPoint().

◆ printJson()

◆ Profile()

void clang::ProgramPoint::Profile ( llvm::FoldingSetNodeID & ID) const
inline

Definition at line 206 of file ProgramPoint.h.

References getData1(), getData2(), getKind(), getLocationContext(), and getTag().

Referenced by getHashValue().

◆ setData2()

void clang::ProgramPoint::setData2 ( const void * d)
inlineprotected

Definition at line 129 of file ProgramPoint.h.

Referenced by clang::PostStore::PostStore().

◆ withTag()

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 135 of file ProgramPoint.h.

References getData1(), getData2(), getKind(), getLocationContext(), and ProgramPoint().

Referenced by clang::ento::CoreEngine::enqueueStmtNode(), and clang::ento::ExprEngine::VisitCXXDestructor().


The documentation for this class was generated from the following files: