clang  8.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
clang::ProgramPoint Class Reference

#include "clang/Analysis/ProgramPoint.h"

Inheritance diagram for clang::ProgramPoint:
Inheritance graph
[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

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 >
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 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 print (StringRef CR, llvm::raw_ostream &Out) 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)
 

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 
)
inlineprotected

Definition at line 103 of file ProgramPoint.h.

References getKind().

◆ ProgramPoint() [3/3]

clang::ProgramPoint::ProgramPoint ( const void *  P1,
const void *  P2,
Kind  k,
const LocationContext l,
const ProgramPointTag tag = nullptr 
)
inlineprotected

Definition at line 116 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 46 of file ProgramPoint.cpp.

◆ getAs()

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

◆ getData1()

const void* clang::ProgramPoint::getData1 ( ) const
inlineprotected

Definition at line 127 of file ProgramPoint.h.

◆ getData2()

const void* clang::ProgramPoint::getData2 ( ) const
inlineprotected

Definition at line 128 of file ProgramPoint.h.

◆ getHashValue()

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

◆ getKind()

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

◆ getLocationContext()

const LocationContext* clang::ProgramPoint::getLocationContext ( ) const
inline

◆ getProgramPoint()

ProgramPoint ProgramPoint::getProgramPoint ( const Stmt S,
ProgramPoint::Kind  K,
const LocationContext LC,
const ProgramPointTag tag 
)
static

◆ getStackFrame()

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

◆ getTag()

const ProgramPointTag* clang::ProgramPoint::getTag ( ) const
inline

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

◆ operator!=()

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

Definition at line 203 of file ProgramPoint.h.

◆ operator==()

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

Definition at line 196 of file ProgramPoint.h.

◆ print()

void ProgramPoint::print ( StringRef  CR,
llvm::raw_ostream &  Out 
) const

Definition at line 60 of file ProgramPoint.cpp.

◆ Profile()

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

Definition at line 210 of file ProgramPoint.h.

References dump(), and getKind().

◆ setData2()

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

Definition at line 129 of file ProgramPoint.h.

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

References getKind().

Referenced by clang::ento::CoreEngine::enqueueStmtNode(), clang::ento::NodeBuilderWithSinks::generateNode(), clang::ento::NodeBuilderWithSinks::generateSink(), and clang::ento::CheckerManager::runCheckersForEndAnalysis().


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