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

CFGElement - 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 {
  Statement, Initializer, NewAllocator, LifetimeEnds,
  LoopExit, AutomaticObjectDtor, DeleteDtor, BaseDtor,
  MemberDtor, TemporaryDtor, DTOR_BEGIN = AutomaticObjectDtor, DTOR_END = TemporaryDtor
}
 

Public Member Functions

template<typename T >
T castAs () const
 Convert to the specified CFGElement type, asserting that this CFGElement is of the desired type. More...
 
template<typename T >
Optional< TgetAs () const
 Convert to the specified CFGElement type, returning None if this CFGElement is not of the desired type. More...
 
Kind getKind () const
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

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

Definition at line 54 of file CFG.h.

Member Enumeration Documentation

◆ Kind

Enumerator
Statement 
Initializer 
NewAllocator 
LifetimeEnds 
LoopExit 
AutomaticObjectDtor 
DeleteDtor 
BaseDtor 
MemberDtor 
TemporaryDtor 
DTOR_BEGIN 
DTOR_END 

Definition at line 56 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 78 of file CFG.h.

References getKind().

◆ CFGElement() [2/2]

clang::CFGElement::CFGElement ( )
inlineprotected

Definition at line 84 of file CFG.h.

Member Function Documentation

◆ castAs()

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

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

References clang::None, and clang::T.

Referenced by canHaveDirectConstructor(), neverReturns(), and print_elem().

◆ 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 file: