clang 20.0.0git
|
Represents a top-level expression in a basic block. More...
#include "clang/Analysis/CFG.h"
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 , CleanupFunction } |
Public Member Functions | |
template<typename T > | |
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) 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 |
|
inlineprotected |
|
protecteddefault |
Convert to the specified CFGElement type, asserting that this CFGElement is of the desired type.
Definition at line 99 of file CFG.h.
References clang::T.
Referenced by clang::dataflow::builtinTransfer(), CheckFallThrough(), clang::ento::CoreEngine::enqueueStmtNode(), getLocationForCaller(), clang::consumed::ConsumedAnalyzer::run(), clang::ento::ExprEngine::VisitLogicalExpr(), and clang::threadSafety::CFGWalker::walk().
|
inline |
Definition at line 127 of file CFG.h.
References dumpToStream().
void CFGElement::dumpToStream | ( | llvm::raw_ostream & | OS | ) | const |
Convert to the specified CFGElement type, returning std::nullopt if this CFGElement is not of the desired type.
Definition at line 109 of file CFG.h.
References clang::T.
Referenced by Accumulate(), CheckFallThrough(), clang::ento::CallEvent::getConstructionContext(), clang::CFGBlock::getLastCondition(), isBuiltinAssumeFalse(), and isImmediateSinkBlock().
|
inline |
Definition at line 118 of file CFG.h.
Referenced by clang::dataflow::builtinTransfer(), CFGElement(), clang::CFGImplicitDtor::getDestructorDecl(), and getLocationForCaller().
|
protected |
Definition at line 84 of file CFG.h.
Referenced by clang::CFGNewAllocator::getAllocatorExpr(), clang::CFGBaseDtor::getBaseSpecifier(), clang::CFGTemporaryDtor::getBindTemporaryExpr(), clang::CFGDeleteDtor::getCXXRecordDecl(), clang::CFGMemberDtor::getFieldDecl(), clang::CFGInitializer::getInitializer(), getKind(), clang::CFGLoopExit::getLoopStmt(), clang::CFGStmt::getStmt(), clang::CFGLifetimeEnds::getVarDecl(), clang::CFGScopeBegin::getVarDecl(), clang::CFGScopeEnd::getVarDecl(), clang::CFGCleanupFunction::getVarDecl(), and clang::CFGAutomaticObjDtor::getVarDecl().
|
protected |
Definition at line 85 of file CFG.h.
Referenced by clang::CFGConstructor::CFGConstructor(), clang::CFGCXXRecordTypedCall::CFGCXXRecordTypedCall(), clang::CFGConstructor::getConstructionContext(), clang::CFGCXXRecordTypedCall::getConstructionContext(), clang::CFGDeleteDtor::getDeleteExpr(), getKind(), clang::CFGLifetimeEnds::getTriggerStmt(), clang::CFGScopeBegin::getTriggerStmt(), clang::CFGScopeEnd::getTriggerStmt(), and clang::CFGAutomaticObjDtor::getTriggerStmt().