clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::CXXTemporaryObjectExpr Class Reference

Represents a C++ functional cast expression that builds a temporary object. More...

#include <ExprCXX.h>

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

List of all members.

Public Member Functions

 CXXTemporaryObjectExpr (ASTContext &C, CXXConstructorDecl *Cons, TypeSourceInfo *Type, Expr **Args, unsigned NumArgs, SourceRange parenRange, bool HadMultipleCandidates, bool ZeroInitialization=false)
 CXXTemporaryObjectExpr (EmptyShell Empty)
TypeSourceInfogetTypeSourceInfo () const
SourceRange getSourceRange () const LLVM_READONLY

Static Public Member Functions

static bool classof (const Stmt *T)
static bool classof (const CXXTemporaryObjectExpr *)

Friends

class ASTStmtReader

Detailed Description

Represents a C++ functional cast expression that builds a temporary object.

This expression type represents a C++ "functional" cast (C++[expr.type.conv]) with N != 1 arguments that invokes a constructor to build a temporary object. With N == 1 arguments the functional cast expression will be represented by CXXFunctionalCastExpr. Example:

 struct X { X(int, float); }

 X create_X() {
   return X(1, 3.14f); // creates a CXXTemporaryObjectExpr
 };

Definition at line 1077 of file ExprCXX.h.


Constructor & Destructor Documentation

CXXTemporaryObjectExpr::CXXTemporaryObjectExpr ( ASTContext C,
CXXConstructorDecl Cons,
TypeSourceInfo Type,
Expr **  Args,
unsigned  NumArgs,
SourceRange  parenRange,
bool  HadMultipleCandidates,
bool  ZeroInitialization = false 
)

Definition at line 681 of file ExprCXX.cpp.

clang::CXXTemporaryObjectExpr::CXXTemporaryObjectExpr ( EmptyShell  Empty) [inline, explicit]

Definition at line 1087 of file ExprCXX.h.


Member Function Documentation

static bool clang::CXXTemporaryObjectExpr::classof ( const Stmt T) [inline, static]

Reimplemented from clang::CXXConstructExpr.

Definition at line 1094 of file ExprCXX.h.

static bool clang::CXXTemporaryObjectExpr::classof ( const CXXTemporaryObjectExpr ) [inline, static]

Definition at line 1097 of file ExprCXX.h.

SourceRange CXXTemporaryObjectExpr::getSourceRange ( ) const

SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. We assume AST clients will have a pointer to the respective SourceManager.

Reimplemented from clang::CXXConstructExpr.

Definition at line 698 of file ExprCXX.cpp.

References clang::SourceRange::getEnd(), and clang::CXXConstructExpr::getParenRange().

TypeSourceInfo* clang::CXXTemporaryObjectExpr::getTypeSourceInfo ( ) const [inline]

Definition at line 1090 of file ExprCXX.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::CXXConstructExpr.

Definition at line 1099 of file ExprCXX.h.


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