clang API Documentation
Represents binding an expression to a temporary. More...
#include <ExprCXX.h>
Public Member Functions | |
CXXBindTemporaryExpr (EmptyShell Empty) | |
CXXTemporary * | getTemporary () |
const CXXTemporary * | getTemporary () const |
void | setTemporary (CXXTemporary *T) |
const Expr * | getSubExpr () const |
Expr * | getSubExpr () |
void | setSubExpr (Expr *E) |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
child_range | children () |
Static Public Member Functions | |
static CXXBindTemporaryExpr * | Create (const ASTContext &C, CXXTemporary *Temp, Expr *SubExpr) |
static bool | classof (const Stmt *T) |
Represents binding an expression to a temporary.
This ensures the destructor is called for the temporary. It should only be needed for non-POD, non-trivially destructable class types. For example:
clang::CXXBindTemporaryExpr::CXXBindTemporaryExpr | ( | EmptyShell | Empty | ) | [inline] |
child_range clang::CXXBindTemporaryExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
static bool clang::CXXBindTemporaryExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::Expr.
Definition at line 1059 of file ExprCXX.h.
References clang::Stmt::getStmtClass().
CXXBindTemporaryExpr * CXXBindTemporaryExpr::Create | ( | const ASTContext & | C, |
CXXTemporary * | Temp, | ||
Expr * | SubExpr | ||
) | [static] |
Definition at line 792 of file ExprCXX.cpp.
References AttributeLangSupport::C, clang::Expr::getType(), clang::Type::isArrayType(), and clang::Type::isRecordType().
Referenced by clang::Sema::MaybeBindToTemporary().
SourceLocation clang::CXXBindTemporaryExpr::getLocEnd | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 1056 of file ExprCXX.h.
References clang::Stmt::getLocEnd().
SourceLocation clang::CXXBindTemporaryExpr::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 1053 of file ExprCXX.h.
References clang::Stmt::getLocStart().
const Expr* clang::CXXBindTemporaryExpr::getSubExpr | ( | ) | const [inline] |
Expr* clang::CXXBindTemporaryExpr::getSubExpr | ( | ) | [inline] |
CXXTemporary* clang::CXXBindTemporaryExpr::getTemporary | ( | ) | [inline] |
Definition at line 1045 of file ExprCXX.h.
Referenced by clang::Sema::ActOnDecltypeExpression(), clang::CodeGen::CodeGenFunction::EmitCXXBindTemporaryLValue(), and clang::CFGImplicitDtor::getDestructorDecl().
const CXXTemporary* clang::CXXBindTemporaryExpr::getTemporary | ( | ) | const [inline] |
void clang::CXXBindTemporaryExpr::setSubExpr | ( | Expr * | E | ) | [inline] |
void clang::CXXBindTemporaryExpr::setTemporary | ( | CXXTemporary * | T | ) | [inline] |