clang 23.0.0git
clang::CFGElement Class Reference

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

#include "clang/Analysis/CFG.h"

Inheritance diagram for clang::CFGElement:
[legend]

Public Types

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

Public Member Functions

template<typename T>
castAs () const
 Convert to the specified CFGElement type, asserting that this CFGElement is of the desired type.
template<typename T>
std::optional< T > getAs () const
 Convert to the specified CFGElement type, returning std::nullopt if this CFGElement is not of the desired type.
Kind getKind () const
void dumpToStream (llvm::raw_ostream &OS, bool TerminateWithNewLine=true) const
void dump () const

Protected Member Functions

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

Protected Attributes

llvm::PointerIntPair< const void *, 2 > Data1
llvm::PointerIntPair< const 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 
NewAllocator 
LoopExit 
FullExprCleanup 
ScopeBegin 
ScopeEnd 
LifetimeEnds 
SCOPE_BEGIN 
SCOPE_END 
Statement 
Constructor 
CXXRecordTypedCall 
STMT_BEGIN 
STMT_END 
AutomaticObjectDtor 
DeleteDtor 
BaseDtor 
MemberDtor 
TemporaryDtor 
DTOR_BEGIN 
DTOR_END 
CleanupFunction 

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 91 of file CFG.h.

References Data1, Data2, getKind(), and kind.

Referenced by castAs(), and getAs().

◆ CFGElement() [2/2]

clang::CFGElement::CFGElement ( )
protecteddefault

Member Function Documentation

◆ castAs()

◆ dump()

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

Definition at line 132 of file CFG.h.

References dumpToStream().

◆ dumpToStream()

void CFGElement::dumpToStream ( llvm::raw_ostream & OS,
bool TerminateWithNewLine = true ) const

Definition at line 5987 of file CFG.cpp.

References print_elem().

Referenced by dump().

◆ getAs()

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

◆ getKind()

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

Member Data Documentation

◆ Data1

◆ Data2


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