clang  14.0.0git
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
clang::CFGElement Class Reference

Represents a top-level expression in a basic block. More...

#include "clang/Analysis/CFG.h"

Inheritance diagram for clang::CFGElement:
Inheritance graph
[legend]
Collaboration diagram for clang::CFGElement:
Collaboration graph
[legend]

Public Types

enum  Kind {
  Initializer, ScopeBegin, ScopeEnd, NewAllocator,
  LifetimeEnds, LoopExit, Statement, Constructor,
  CXXRecordTypedCall, STMT_BEGIN = Statement, STMT_END = CXXRecordTypedCall, AutomaticObjectDtor,
  DeleteDtor, BaseDtor, MemberDtor, TemporaryDtor,
  DTOR_BEGIN = AutomaticObjectDtor, DTOR_END = TemporaryDtor
}
 

Public Member Functions

template<typename T >
castAs () const
 Convert to the specified CFGElement type, asserting that this CFGElement is of the desired type. More...
 
template<typename T >
Optional< T > getAs () const
 Convert to the specified CFGElement type, returning None if this CFGElement is not of the desired type. More...
 
Kind getKind () const
 
void dumpToStream (llvm::raw_ostream &OS) const
 
void dump () const
 

Protected Member Functions

 CFGElement (Kind kind, const void *Ptr1, const void *Ptr2=nullptr)
 
 CFGElement ()=default
 

Protected Attributes

llvm::PointerIntPair< void *, 2 > Data1
 
llvm::PointerIntPair< void *, 2 > Data2
 

Detailed Description

Represents a top-level expression in a basic block.

Definition at line 55 of file CFG.h.

Member Enumeration Documentation

◆ Kind

Enumerator
Initializer 
ScopeBegin 
ScopeEnd 
NewAllocator 
LifetimeEnds 
LoopExit 
Statement 
Constructor 
CXXRecordTypedCall 
STMT_BEGIN 
STMT_END 
AutomaticObjectDtor 
DeleteDtor 
BaseDtor 
MemberDtor 
TemporaryDtor 
DTOR_BEGIN 
DTOR_END 

Definition at line 57 of file CFG.h.

Constructor & Destructor Documentation

◆ CFGElement() [1/2]

clang::CFGElement::CFGElement ( Kind  kind,
const void *  Ptr1,
const void *  Ptr2 = nullptr 
)
inlineprotected

Definition at line 86 of file CFG.h.

References getKind().

◆ CFGElement() [2/2]

clang::CFGElement::CFGElement ( )
protecteddefault

Member Function Documentation

◆ castAs()

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

◆ dump()

void clang::CFGElement::dump ( ) const
inline

Definition at line 127 of file CFG.h.

References dumpToStream().

◆ dumpToStream()

void CFGElement::dumpToStream ( llvm::raw_ostream &  OS) const

Definition at line 5494 of file CFG.cpp.

References print_elem().

Referenced by dump().

◆ getAs()

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

Convert to the specified CFGElement type, returning None if this CFGElement is not of the desired type.

Definition at line 109 of file CFG.h.

Referenced by Accumulate(), CheckFallThrough(), clang::ento::CallEventManager::getCaller(), clang::ento::CallEvent::getConstructionContext(), clang::CFGBlock::getLastCondition(), and ResolveCondition().

◆ getKind()

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

Member Data Documentation

◆ Data1

llvm::PointerIntPair<void *, 2> clang::CFGElement::Data1
protected

◆ Data2

llvm::PointerIntPair<void *, 2> clang::CFGElement::Data2
protected

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