class CXX17ElidedCopyReturnedValueConstructionContext
Declaration
class CXX17ElidedCopyReturnedValueConstructionContext
: public ReturnedValueConstructionContext { /* full declaration omitted */ };
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.
Declared at: clang/include/clang/Analysis/ConstructionContext.h:629
Inherits from: ReturnedValueConstructionContext
Member Variables
- private const clang::CXXBindTemporaryExpr* BTE
Inherited from ConstructionContext:
Method Overview
- private CXX17ElidedCopyReturnedValueConstructionContext(const clang::ReturnStmt * RS, const clang::CXXBindTemporaryExpr * BTE)
- public static bool classof(const clang::ConstructionContext * CC)
- public const clang::CXXBindTemporaryExpr * getCXXBindTemporaryExpr() const
Inherited from ReturnedValueConstructionContext:
Inherited from ConstructionContext:
Methods
¶CXX17ElidedCopyReturnedValueConstructionContext(
const clang::ReturnStmt* RS,
const clang::CXXBindTemporaryExpr* BTE)
CXX17ElidedCopyReturnedValueConstructionContext(
const clang::ReturnStmt* RS,
const clang::CXXBindTemporaryExpr* BTE)
Declared at: clang/include/clang/Analysis/ConstructionContext.h:635
Parameters
- const clang::ReturnStmt* RS
- const clang::CXXBindTemporaryExpr* BTE
¶static bool classof(
const clang::ConstructionContext* CC)
static bool classof(
const clang::ConstructionContext* CC)
Declared at: clang/include/clang/Analysis/ConstructionContext.h:646
Parameters
- const clang::ConstructionContext* CC
¶const clang::CXXBindTemporaryExpr*
getCXXBindTemporaryExpr() const
const clang::CXXBindTemporaryExpr*
getCXXBindTemporaryExpr() const
Declared at: clang/include/clang/Analysis/ConstructionContext.h:644