clang 20.0.0git
|
ConstructionContext's subclasses describe different ways of constructing an object in C++. More...
#include "clang/Analysis/ConstructionContext.h"
Public Types | |
enum | Kind { SimpleVariableKind , CXX17ElidedCopyVariableKind , VARIABLE_BEGIN = SimpleVariableKind , VARIABLE_END = CXX17ElidedCopyVariableKind , SimpleConstructorInitializerKind , CXX17ElidedCopyConstructorInitializerKind , INITIALIZER_BEGIN = SimpleConstructorInitializerKind , INITIALIZER_END = CXX17ElidedCopyConstructorInitializerKind , NewAllocatedObjectKind , SimpleTemporaryObjectKind , ElidedTemporaryObjectKind , TEMPORARY_BEGIN = SimpleTemporaryObjectKind , TEMPORARY_END = ElidedTemporaryObjectKind , SimpleReturnedValueKind , CXX17ElidedCopyReturnedValueKind , RETURNED_VALUE_BEGIN = SimpleReturnedValueKind , RETURNED_VALUE_END = CXX17ElidedCopyReturnedValueKind , ArgumentKind , LambdaCaptureKind } |
Public Member Functions | |
Kind | getKind () const |
virtual const ArrayInitLoopExpr * | getArrayInitLoop () const |
virtual | ~ConstructionContext ()=default |
Static Public Member Functions | |
static const ConstructionContext * | createFromLayers (BumpVectorContext &C, const ConstructionContextLayer *TopLayer) |
Consume the construction context layer, together with its parent layers, and wrap it up into a complete construction context. | |
Protected Member Functions | |
ConstructionContext (Kind K) | |
Protected Attributes | |
Kind | K |
ConstructionContext's subclasses describe different ways of constructing an object in C++.
The context re-captures the essential parent AST nodes of the CXXConstructExpr it is assigned to and presents these nodes through easy-to-understand accessor methods.
Definition at line 243 of file ConstructionContext.h.
Definition at line 245 of file ConstructionContext.h.
|
inlineexplicitprotected |
Definition at line 272 of file ConstructionContext.h.
|
virtualdefault |
|
static |
Consume the construction context layer, together with its parent layers, and wrap it up into a complete construction context.
May return null if layers do not form any supported construction context.
Definition at line 170 of file ConstructionContext.cpp.
References clang::ConstructionContextItem::ArgumentKind, clang::C, E, clang::ConstructionContextItem::ElidableConstructorKind, clang::ConstructionContextItem::ElidedDestructorKind, clang::Type::getAsCXXRecordDecl(), clang::QualType::getCanonicalType(), clang::ConstructionContextItem::getCXXCtorInitializer(), clang::ConstructionContextItem::getIndex(), clang::ConstructionContextLayer::getItem(), clang::ConstructionContextItem::getKind(), clang::ConstructionContextLayer::getParent(), clang::ConstructionContextItem::getStmt(), clang::Expr::getType(), clang::CXXRecordDecl::hasNonTrivialDestructor(), clang::ConstructionContextItem::InitializerKind, clang::ConstructionContextLayer::isLast(), clang::ConstructionContextItem::LambdaCaptureKind, clang::ConstructionContextItem::MaterializationKind, clang::ConstructionContextItem::NewAllocatorKind, clang::ConstructionContextItem::ReturnKind, clang::ConstructionContextItem::TemporaryDestructorKind, and clang::ConstructionContextItem::VariableKind.
|
inlinevirtual |
Reimplemented in clang::VariableConstructionContext, clang::ConstructorInitializerConstructionContext, and clang::LambdaCaptureConstructionContext.
Definition at line 309 of file ConstructionContext.h.
|
inline |
Definition at line 307 of file ConstructionContext.h.
References K.
Referenced by clang::VariableConstructionContext::classof(), clang::SimpleVariableConstructionContext::classof(), clang::CXX17ElidedCopyVariableConstructionContext::classof(), clang::ConstructorInitializerConstructionContext::classof(), clang::SimpleConstructorInitializerConstructionContext::classof(), clang::CXX17ElidedCopyConstructorInitializerConstructionContext::classof(), clang::NewAllocatedObjectConstructionContext::classof(), clang::TemporaryObjectConstructionContext::classof(), clang::SimpleTemporaryObjectConstructionContext::classof(), clang::ElidedTemporaryObjectConstructionContext::classof(), clang::ReturnedValueConstructionContext::classof(), clang::SimpleReturnedValueConstructionContext::classof(), clang::CXX17ElidedCopyReturnedValueConstructionContext::classof(), clang::ArgumentConstructionContext::classof(), clang::LambdaCaptureConstructionContext::classof(), clang::ento::ExprEngine::computeObjectUnderConstruction(), print_construction_context(), and clang::ento::ExprEngine::updateObjectsUnderConstruction().
|
protected |
Definition at line 268 of file ConstructionContext.h.
Referenced by getKind().