clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
clang::CXXConstructExpr Class Reference

CXXConstructExpr - Represents a call to a C++ constructor. More...

#include <ExprCXX.h>

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

List of all members.

Public Types

enum  ConstructionKind { CK_Complete, CK_NonVirtualBase, CK_VirtualBase, CK_Delegating }
typedef ExprIterator arg_iterator
typedef ConstExprIterator const_arg_iterator

Public Member Functions

 CXXConstructExpr (EmptyShell Empty)
 Construct an empty C++ construction expression.
CXXConstructorDeclgetConstructor () const
void setConstructor (CXXConstructorDecl *C)
SourceLocation getLocation () const
void setLocation (SourceLocation Loc)
bool isElidable () const
 Whether this construction is elidable.
void setElidable (bool E)
bool hadMultipleCandidates () const
 Whether the referred constructor was resolved from an overloaded set having size greater than 1.
void setHadMultipleCandidates (bool V)
bool isListInitialization () const
 Whether this constructor call was written as list-initialization.
void setListInitialization (bool V)
bool requiresZeroInitialization () const
 Whether this construction first requires zero-initialization before the initializer is called.
void setRequiresZeroInitialization (bool ZeroInit)
ConstructionKind getConstructionKind () const
 Determines whether this constructor is actually constructing a base class (rather than a complete object).
void setConstructionKind (ConstructionKind CK)
arg_iterator arg_begin ()
arg_iterator arg_end ()
const_arg_iterator arg_begin () const
const_arg_iterator arg_end () const
Expr ** getArgs () const
unsigned getNumArgs () const
ExprgetArg (unsigned Arg)
 getArg - Return the specified argument.
const ExprgetArg (unsigned Arg) const
void setArg (unsigned Arg, Expr *ArgExpr)
 setArg - Set the specified argument.
SourceRange getSourceRange () const LLVM_READONLY
SourceRange getParenRange () const
child_range children ()

Static Public Member Functions

static CXXConstructExprCreate (ASTContext &C, QualType T, SourceLocation Loc, CXXConstructorDecl *D, bool Elidable, Expr **Args, unsigned NumArgs, bool HadMultipleCandidates, bool ListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenRange)
static bool classof (const Stmt *T)
static bool classof (const CXXConstructExpr *)

Protected Member Functions

 CXXConstructExpr (ASTContext &C, StmtClass SC, QualType T, SourceLocation Loc, CXXConstructorDecl *d, bool elidable, Expr **args, unsigned numargs, bool HadMultipleCandidates, bool ListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenRange)
 CXXConstructExpr (StmtClass SC, EmptyShell Empty)
 Construct an empty C++ construction expression.

Friends

class ASTStmtReader

Detailed Description

CXXConstructExpr - Represents a call to a C++ constructor.

Definition at line 880 of file ExprCXX.h.


Member Typedef Documentation

Definition at line 974 of file ExprCXX.h.

Definition at line 975 of file ExprCXX.h.


Member Enumeration Documentation

Enumerator:
CK_Complete 
CK_NonVirtualBase 
CK_VirtualBase 
CK_Delegating 

Definition at line 882 of file ExprCXX.h.


Constructor & Destructor Documentation

CXXConstructExpr::CXXConstructExpr ( ASTContext C,
StmtClass  SC,
QualType  T,
SourceLocation  Loc,
CXXConstructorDecl d,
bool  elidable,
Expr **  args,
unsigned  numargs,
bool  HadMultipleCandidates,
bool  ListInitialization,
bool  ZeroInitialization,
ConstructionKind  ConstructKind,
SourceRange  ParenRange 
) [protected]
clang::CXXConstructExpr::CXXConstructExpr ( StmtClass  SC,
EmptyShell  Empty 
) [inline, protected]

Construct an empty C++ construction expression.

Definition at line 914 of file ExprCXX.h.

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

Construct an empty C++ construction expression.

Definition at line 922 of file ExprCXX.h.


Member Function Documentation

arg_iterator clang::CXXConstructExpr::arg_begin ( ) [inline]
const_arg_iterator clang::CXXConstructExpr::arg_begin ( ) const [inline]

Definition at line 979 of file ExprCXX.h.

arg_iterator clang::CXXConstructExpr::arg_end ( ) [inline]
const_arg_iterator clang::CXXConstructExpr::arg_end ( ) const [inline]

Definition at line 980 of file ExprCXX.h.

child_range clang::CXXConstructExpr::children ( ) [inline]

Reimplemented from clang::Stmt.

Definition at line 1011 of file ExprCXX.h.

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

Reimplemented from clang::Expr.

Reimplemented in clang::CXXTemporaryObjectExpr.

Definition at line 1004 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

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

Definition at line 1008 of file ExprCXX.h.

CXXConstructExpr * CXXConstructExpr::Create ( ASTContext C,
QualType  T,
SourceLocation  Loc,
CXXConstructorDecl D,
bool  Elidable,
Expr **  Args,
unsigned  NumArgs,
bool  HadMultipleCandidates,
bool  ListInitialization,
bool  ZeroInitialization,
ConstructionKind  ConstructKind,
SourceRange  ParenRange 
) [static]
Expr* clang::CXXConstructExpr::getArg ( unsigned  Arg) [inline]

getArg - Return the specified argument.

Definition at line 986 of file ExprCXX.h.

References Arg.

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), getSourceRange(), and clang::Expr::isConstantInitializer().

const Expr* clang::CXXConstructExpr::getArg ( unsigned  Arg) const [inline]

Definition at line 990 of file ExprCXX.h.

References Arg.

Expr** clang::CXXConstructExpr::getArgs ( ) const [inline]

Definition at line 982 of file ExprCXX.h.

Referenced by clang::Sema::SubstInitializer().

ConstructionKind clang::CXXConstructExpr::getConstructionKind ( ) const [inline]

Determines whether this constructor is actually constructing a base class (rather than a complete object).

Definition at line 967 of file ExprCXX.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr().

CXXConstructorDecl* clang::CXXConstructExpr::getConstructor ( ) const [inline]
SourceLocation clang::CXXConstructExpr::getLocation ( ) const [inline]

Definition at line 942 of file ExprCXX.h.

unsigned clang::CXXConstructExpr::getNumArgs ( ) const [inline]
SourceRange clang::CXXConstructExpr::getParenRange ( ) const [inline]

Definition at line 1002 of file ExprCXX.h.

Referenced by clang::CXXTemporaryObjectExpr::getSourceRange().

SourceRange CXXConstructExpr::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::Stmt.

Reimplemented in clang::CXXTemporaryObjectExpr.

Definition at line 396 of file ExprCXX.cpp.

References Arg, getArg(), clang::SourceRange::getEnd(), clang::Stmt::getLocEnd(), getNumArgs(), clang::Expr::isDefaultArgument(), clang::SourceLocation::isValid(), and clang::SourceRange::isValid().

bool clang::CXXConstructExpr::hadMultipleCandidates ( ) const [inline]

Whether the referred constructor was resolved from an overloaded set having size greater than 1.

Definition at line 951 of file ExprCXX.h.

bool clang::CXXConstructExpr::isElidable ( ) const [inline]
bool clang::CXXConstructExpr::isListInitialization ( ) const [inline]

Whether this constructor call was written as list-initialization.

Definition at line 955 of file ExprCXX.h.

bool clang::CXXConstructExpr::requiresZeroInitialization ( ) const [inline]

Whether this construction first requires zero-initialization before the initializer is called.

Definition at line 960 of file ExprCXX.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), and clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtor().

void clang::CXXConstructExpr::setArg ( unsigned  Arg,
Expr ArgExpr 
) [inline]

setArg - Set the specified argument.

Definition at line 996 of file ExprCXX.h.

References Arg.

void clang::CXXConstructExpr::setConstructionKind ( ConstructionKind  CK) [inline]

Definition at line 970 of file ExprCXX.h.

void clang::CXXConstructExpr::setConstructor ( CXXConstructorDecl C) [inline]

Definition at line 940 of file ExprCXX.h.

void clang::CXXConstructExpr::setElidable ( bool  E) [inline]

Definition at line 947 of file ExprCXX.h.

void clang::CXXConstructExpr::setHadMultipleCandidates ( bool  V) [inline]

Definition at line 952 of file ExprCXX.h.

void clang::CXXConstructExpr::setListInitialization ( bool  V) [inline]

Definition at line 956 of file ExprCXX.h.

void clang::CXXConstructExpr::setLocation ( SourceLocation  Loc) [inline]

Definition at line 943 of file ExprCXX.h.

void clang::CXXConstructExpr::setRequiresZeroInitialization ( bool  ZeroInit) [inline]

Definition at line 961 of file ExprCXX.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Reimplemented in clang::CXXTemporaryObjectExpr.

Definition at line 1015 of file ExprCXX.h.


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