clang 8.0.0

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
clang::ConstructionContext Class Reference

ConstructionContext's subclasses describe different ways of constructing an object in C++. More...

`#include "clang/Analysis/ConstructionContext.h"`

Inheritance diagram for clang::ConstructionContext:
[legend]
Collaboration diagram for clang::ConstructionContext:
[legend]

## 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 }

## Public Member Functions
Kind | getKind () const

## 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. More...

## Protected Member Functions
| ConstructionContext (Kind K)

## Protected Attributes
Kind | K

## Detailed Description

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 234 of file ConstructionContext.h.

## Member Enumeration Documentation

## ◆ Kind

enum clang::ConstructionContext::Kind

Enumerator
SimpleVariableKind |
CXX17ElidedCopyVariableKind |
VARIABLE_BEGIN |
VARIABLE_END |
SimpleConstructorInitializerKind |
CXX17ElidedCopyConstructorInitializerKind |
INITIALIZER_BEGIN |
INITIALIZER_END |
NewAllocatedObjectKind |
SimpleTemporaryObjectKind |
ElidedTemporaryObjectKind |
TEMPORARY_BEGIN |
TEMPORARY_END |
SimpleReturnedValueKind |
CXX17ElidedCopyReturnedValueKind |
RETURNED_VALUE_BEGIN |
RETURNED_VALUE_END |
ArgumentKind |

Definition at line 236 of file ConstructionContext.h.

## Constructor & Destructor Documentation

## ◆ ConstructionContext()

clang::ConstructionContext::ConstructionContext | ( | Kind | K | ) |
| inline explicit protected

Definition at line 262 of file ConstructionContext.h.

References clang::C, clang::serialized_diags::create(), and clang::BumpVectorContext::getAllocator().

## Member Function Documentation

## ◆ createFromLayers()

const ConstructionContext * ConstructionContext::createFromLayers | ( | BumpVectorContext & | C,
|  | const ConstructionContextLayer * | TopLayer
| ) |  |
| 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 165 of file ConstructionContext.cpp.

References clang::ConstructionContextItem::ArgumentKind, clang::C, 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::MaterializationKind, clang::ConstructionContextItem::NewAllocatorKind, clang::ConstructionContextItem::ReturnKind, clang::ConstructionContextItem::TemporaryDestructorKind, and clang::ConstructionContextItem::VariableKind.

## ◆ getKind()

Kind clang::ConstructionContext::getKind | ( |  | ) | const
| inline

Definition at line 297 of file ConstructionContext.h.

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::ento::ExprEngine::CreateCXXTemporaryObject(), and print_construction_context().

## Member Data Documentation

## ◆ K

Kind clang::ConstructionContext::K
| protected

Definition at line 258 of file ConstructionContext.h.

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

- include/clang/Analysis/ConstructionContext.h
- lib/Analysis/ConstructionContext.cpp