clang  9.0.0svn
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::ElidedTemporaryObjectConstructionContext Class Reference

Represents a temporary object that is constructed for the sole purpose of being immediately copied by an elidable copy/move constructor. More...

#include "clang/Analysis/ConstructionContext.h"

Inheritance diagram for clang::ElidedTemporaryObjectConstructionContext:
Inheritance graph
[legend]
Collaboration diagram for clang::ElidedTemporaryObjectConstructionContext:
Collaboration graph
[legend]

Public Member Functions

const CXXConstructExprgetConstructorAfterElision () const
 
const ConstructionContextgetConstructionContextAfterElision () const
 
- Public Member Functions inherited from clang::TemporaryObjectConstructionContext
const CXXBindTemporaryExprgetCXXBindTemporaryExpr () const
 CXXBindTemporaryExpr here is non-null as long as the temporary has a non-trivial destructor. More...
 
const MaterializeTemporaryExprgetMaterializedTemporaryExpr () const
 MaterializeTemporaryExpr is non-null as long as the temporary is actually used after construction, eg. More...
 
- Public Member Functions inherited from clang::ConstructionContext
Kind getKind () const
 

Static Public Member Functions

static bool classof (const ConstructionContext *CC)
 
- Static Public Member Functions inherited from clang::TemporaryObjectConstructionContext
static bool classof (const ConstructionContext *CC)
 
- Static Public Member Functions inherited from clang::ConstructionContext
static const ConstructionContextcreateFromLayers (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...
 

Friends

class ConstructionContext
 

Additional Inherited Members

- Public Types inherited from clang::ConstructionContext
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
}
 
- Protected Member Functions inherited from clang::TemporaryObjectConstructionContext
 TemporaryObjectConstructionContext (ConstructionContext::Kind K, const CXXBindTemporaryExpr *BTE, const MaterializeTemporaryExpr *MTE)
 
- Protected Member Functions inherited from clang::ConstructionContext
 ConstructionContext (Kind K)
 
- Protected Attributes inherited from clang::ConstructionContext
Kind K
 

Detailed Description

Represents a temporary object that is constructed for the sole purpose of being immediately copied by an elidable copy/move constructor.

For example, T t = T(123); includes a temporary T(123) that is immediately copied to variable t. In such cases the elidable copy can (but not necessarily should) be omitted ("elided") accodring to the rules of the language; the constructor would then construct variable t directly. This construction context contains information of the elidable constructor and its respective construction context.

Definition at line 523 of file ConstructionContext.h.

Member Function Documentation

◆ classof()

static bool clang::ElidedTemporaryObjectConstructionContext::classof ( const ConstructionContext CC)
inlinestatic

Definition at line 551 of file ConstructionContext.h.

References clang::ConstructionContext::getKind().

◆ getConstructionContextAfterElision()

const ConstructionContext* clang::ElidedTemporaryObjectConstructionContext::getConstructionContextAfterElision ( ) const
inline

Definition at line 547 of file ConstructionContext.h.

◆ getConstructorAfterElision()

const CXXConstructExpr* clang::ElidedTemporaryObjectConstructionContext::getConstructorAfterElision ( ) const
inline

Definition at line 543 of file ConstructionContext.h.

Friends And Related Function Documentation

◆ ConstructionContext

friend class ConstructionContext
friend

Definition at line 528 of file ConstructionContext.h.


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