clang: clang::CFGElement Class Reference (original) (raw)
Represents a top-level expression in a basic block. More...
#include "[clang/Analysis/CFG.h](CFG%5F8h%5Fsource.html)"
| 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, bool TerminateWithNewLine=true) const |
| void | dump () const |
| Protected Member Functions |
|---|
| Protected Attributes | |
|---|---|
| llvm::PointerIntPair< const void *, 2 > | Data1 |
| llvm::PointerIntPair< const void *, 2 > | Data2 |
Represents a top-level expression in a basic block.
Definition at line 55 of file CFG.h.
◆ Kind
| Enumerator |
|---|
| Initializer |
| ScopeBegin |
| ScopeEnd |
| NewAllocator |
| LifetimeEnds |
| LoopExit |
| 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.
| clang::CFGElement::CFGElement ( Kind kind, const void * Ptr1, const void * Ptr2 = nullptr ) | inlineprotected |
|---|
◆ CFGElement() [2/2]
| clang::CFGElement::CFGElement ( ) | protecteddefault |
|---|
◆ castAs()
template<typename T>
| T clang::CFGElement::castAs ( ) const | inline |
|---|
Convert to the specified CFGElement type, asserting that this CFGElement is of the desired type.
Definition at line 99 of file CFG.h.
References CFGElement(), and clang::T.
Referenced by clang::dataflow::builtinTransfer(), CheckFallThrough(), clang::ento::CoreEngine::enqueueStmtNode(), clang::CFGImplicitDtor::getDestructorDecl(), getLocationForCaller(), print_elem(), clang::ento::ExprEngine::processCFGElement(), clang::ento::ExprEngine::ProcessImplicitDtor(), clang::consumed::ConsumedAnalyzer::run(), clang::ento::ExprEngine::VisitLogicalExpr(), and clang::threadSafety::CFGWalker::walk().
◆ dump()
| void clang::CFGElement::dump ( ) const | inline |
|---|
◆ dumpToStream()
| void CFGElement::dumpToStream | ( | llvm::raw_ostream & | OS, |
|---|---|---|---|
| bool | TerminateWithNewLine = true ) const |
◆ getAs()
template<typename T>
| std::optional< T > clang::CFGElement::getAs ( ) const | inline |
|---|
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 CFGElement(), and clang::T.
Referenced by Accumulate(), CheckFallThrough(), clang::ento::CallEventManager::getCaller(), clang::ento::CallEvent::getConstructionContext(), clang::CFGBlock::getLastCondition(), isBuiltinAssumeFalse(), isImmediateSinkBlock(), print_elem(), clang::lifetimes::internal::FactsGenerator::run(), and clang::dataflow::ChromiumCheckModel::transfer().
◆ getKind()
| Kind clang::CFGElement::getKind ( ) const | inline |
|---|
◆ Data1
| llvm::PointerIntPair<const void *, 2> clang::CFGElement::Data1 | protected |
|---|
Definition at line 84 of file CFG.h.
Referenced by CFGElement(), 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::CFGAutomaticObjDtor::getVarDecl(), clang::CFGCleanupFunction::getVarDecl(), clang::CFGLifetimeEnds::getVarDecl(), clang::CFGScopeBegin::getVarDecl(), and clang::CFGScopeEnd::getVarDecl().
◆ Data2
| llvm::PointerIntPair<const void *, 2> clang::CFGElement::Data2 | protected |
|---|
Definition at line 85 of file CFG.h.
Referenced by clang::CFGConstructor::CFGConstructor(), clang::CFGCXXRecordTypedCall::CFGCXXRecordTypedCall(), CFGElement(), clang::CFGConstructor::getConstructionContext(), clang::CFGCXXRecordTypedCall::getConstructionContext(), clang::CFGDeleteDtor::getDeleteExpr(), getKind(), clang::CFGAutomaticObjDtor::getTriggerStmt(), clang::CFGLifetimeEnds::getTriggerStmt(), clang::CFGScopeBegin::getTriggerStmt(), and clang::CFGScopeEnd::getTriggerStmt().
The documentation for this class was generated from the following files: