class TemporaryObjectConstructionContext

Declaration

class TemporaryObjectConstructionContext : public ConstructionContext { /* full declaration omitted */ };

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.

Declared at: clang/include/clang/Analysis/ConstructionContext.h:486

Inherits from: ConstructionContext

Member Variables

private const clang::CXXBindTemporaryExpr* BTE
private const clang::MaterializeTemporaryExpr* MTE

Inherited from ConstructionContext:

protected K

Method Overview

Inherited from ConstructionContext:

Methods

TemporaryObjectConstructionContext(
    ConstructionContext::Kind K,
    const clang::CXXBindTemporaryExpr* BTE,
    const clang::MaterializeTemporaryExpr* MTE)

Declared at: clang/include/clang/Analysis/ConstructionContext.h:491

Parameters

ConstructionContext::Kind K
const clang::CXXBindTemporaryExpr* BTE
const clang::MaterializeTemporaryExpr* MTE

static bool classof(
    const clang::ConstructionContext* CC)

Declared at: clang/include/clang/Analysis/ConstructionContext.h:517

Parameters

const clang::ConstructionContext* CC

const clang::CXXBindTemporaryExpr*
getCXXBindTemporaryExpr() const

Description

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

Declared at: clang/include/clang/Analysis/ConstructionContext.h:504

const clang::MaterializeTemporaryExpr*
getMaterializedTemporaryExpr() const

Description

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.

Declared at: clang/include/clang/Analysis/ConstructionContext.h:513