class LifetimeExtendedTemporaryDecl

Declaration

class LifetimeExtendedTemporaryDecl : public Decl, public Mergeable { /* full declaration omitted */ };

Description

Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-extended by a declaration

Declared at: clang/include/clang/AST/DeclCXX.h:3127

Inherits from: Decl, Mergeable

Member Variables

private clang::Stmt* ExprWithTemporary = nullptr
private clang::ValueDecl* ExtendingDecl = nullptr
The declaration which lifetime-extended this reference, if any. Either a VarDecl, or (for a ctor-initializer) a FieldDecl.
private unsigned int ManglingNumber
private clang::APValue* Value = nullptr

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

Inherited from Decl:

Methods

static clang::LifetimeExtendedTemporaryDecl*
Create(clang::Expr* Temp,
       clang::ValueDecl* EDec,
       unsigned int Mangling)

Declared at: clang/include/clang/AST/DeclCXX.h:3154

Parameters

clang::Expr* Temp
clang::ValueDecl* EDec
unsigned int Mangling

static clang::LifetimeExtendedTemporaryDecl*
CreateDeserialized(clang::ASTContext& C,
                   unsigned int ID)

Declared at: clang/include/clang/AST/DeclCXX.h:3159

Parameters

clang::ASTContext& C
unsigned int ID

LifetimeExtendedTemporaryDecl(
    clang::Expr* Temp,
    clang::ValueDecl* EDecl,
    unsigned int Mangling)

Declared at: clang/include/clang/AST/DeclCXX.h:3144

Parameters

clang::Expr* Temp
clang::ValueDecl* EDecl
unsigned int Mangling

LifetimeExtendedTemporaryDecl(
    clang::Decl::EmptyShell)

Declared at: clang/include/clang/AST/DeclCXX.h:3150

Parameters

clang::Decl::EmptyShell

virtual void anchor()

Declared at: clang/include/clang/AST/DeclCXX.h:3142

Stmt::const_child_range childrenExpr() const

Declared at: clang/include/clang/AST/DeclCXX.h:3191

Stmt::child_range childrenExpr()

Declared at: clang/include/clang/AST/DeclCXX.h:3187

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/DeclCXX.h:3195

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/DeclCXX.h:3196

Parameters

clang::Decl::Kind K

const clang::ValueDecl* getExtendingDecl() const

Declared at: clang/include/clang/AST/DeclCXX.h:3165

clang::ValueDecl* getExtendingDecl()

Declared at: clang/include/clang/AST/DeclCXX.h:3164

unsigned int getManglingNumber() const

Declared at: clang/include/clang/AST/DeclCXX.h:3178

clang::APValue* getOrCreateValue(
    bool MayCreate) const

Description

Get the storage for the constant value of a materialized temporary of static storage duration.

Declared at: clang/include/clang/AST/DeclCXX.h:3182

Parameters

bool MayCreate

clang::StorageDuration getStorageDuration() const

Description

Retrieve the storage duration for the materialized temporary.

Declared at: clang/include/clang/AST/DeclCXX.h:3168

const clang::Expr* getTemporaryExpr() const

Declared at: clang/include/clang/AST/DeclCXX.h:3176

clang::Expr* getTemporaryExpr()

Description

Retrieve the expression to which the temporary materialization conversion was applied. This isn't necessarily the initializer of the temporary due to the C++98 delayed materialization rules, but skipRValueSubobjectAdjustments can be used to find said initializer within the subexpression.

Declared at: clang/include/clang/AST/DeclCXX.h:3175

clang::APValue* getValue() const

Declared at: clang/include/clang/AST/DeclCXX.h:3184