clang  7.0.0svn
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::TemporaryObjectConstructionContext Class Reference

Represents a temporary object, eg. More...

#include "clang/Analysis/ConstructionContext.h"

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

Public Member Functions

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::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, TemporaryObjectKind, SimpleReturnedValueKind, CXX17ElidedCopyReturnedValueKind,
  RETURNED_VALUE_BEGIN = SimpleReturnedValueKind, RETURNED_VALUE_END = CXX17ElidedCopyReturnedValueKind
}
 
- Protected Member Functions inherited from clang::ConstructionContext
 ConstructionContext (Kind K)
 
- Protected Attributes inherited from clang::ConstructionContext
Kind K
 

Detailed Description

Represents a temporary object, eg.

T(123), that does not immediately cross function boundaries "by value"; constructors that construct function value-type arguments or values that are immediately returned from the function that returns a value receive separate construction context kinds.

Definition at line 304 of file ConstructionContext.h.

Member Function Documentation

◆ classof()

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

Definition at line 336 of file ConstructionContext.h.

References clang::ConstructionContext::getKind().

◆ getCXXBindTemporaryExpr()

const CXXBindTemporaryExpr* clang::TemporaryObjectConstructionContext::getCXXBindTemporaryExpr ( ) const
inline

CXXBindTemporaryExpr here is non-null as long as the temporary has a non-trivial destructor.

Definition at line 323 of file ConstructionContext.h.

◆ getMaterializedTemporaryExpr()

const MaterializeTemporaryExpr* clang::TemporaryObjectConstructionContext::getMaterializedTemporaryExpr ( ) const
inline

MaterializeTemporaryExpr is non-null as long as the temporary is actually used after construction, eg.

by binding to a reference (lifetime extension), accessing a field, calling a method, or passing it into a function (an elidable copy or move constructor would be a common example) by reference.

Definition at line 332 of file ConstructionContext.h.

Friends And Related Function Documentation

◆ ConstructionContext

friend class ConstructionContext
friend

Definition at line 308 of file ConstructionContext.h.


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