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

Represents a temporary object that is being immediately returned from a function by value, eg. More...

#include "clang/Analysis/ConstructionContext.h"

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

Public Member Functions

const CXXBindTemporaryExprgetCXXBindTemporaryExpr () const
 
- Public Member Functions inherited from clang::ReturnedValueConstructionContext
const ReturnStmtgetReturnStmt () const
 
- 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::ReturnedValueConstructionContext
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::ReturnedValueConstructionContext
 ReturnedValueConstructionContext (ConstructionContext::Kind K, const ReturnStmt *RS)
 
- 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 being immediately returned from a function by value, eg.

return t; or return T(123); in C++17. In C++17 there is not going to be an elidable copy constructor at the return site. However, the usual temporary-related bureaucracy (CXXBindTemporaryExpr, MaterializeTemporaryExpr) is normally located in the caller function's AST. Note that if the object has trivial destructor, then this code is indistinguishable from a simple returned value constructor on the AST level; in this case we provide a simple returned value construction context.

Definition at line 603 of file ConstructionContext.h.

Member Function Documentation

◆ classof()

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

Definition at line 620 of file ConstructionContext.h.

References clang::ConstructionContext::getKind().

◆ getCXXBindTemporaryExpr()

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

Definition at line 618 of file ConstructionContext.h.

Friends And Related Function Documentation

◆ ConstructionContext

friend class ConstructionContext
friend

Definition at line 607 of file ConstructionContext.h.


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