clang API Documentation

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

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
typedef llvm::iterator_range
< arg_iterator
arg_range
typedef llvm::iterator_range
< const_arg_iterator
arg_const_range

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 isStdInitListInitialization () const
 Whether this constructor call was written as list-initialization, but was interpreted as forming a std::initializer_list<T> from the list and passing that as a single constructor argument. See C++11 [over.match.list]p1 bullet 1.
void setStdInitListInitialization (bool V)
bool requiresZeroInitialization () const
 Whether this construction first requires zero-initialization before the initializer is called.
void setRequiresZeroInitialization (bool ZeroInit)
ConstructionKind getConstructionKind () const
 Determine whether this constructor is actually constructing a base class (rather than a complete object).
void setConstructionKind (ConstructionKind CK)
arg_range arguments ()
arg_const_range arguments () const
arg_iterator arg_begin ()
arg_iterator arg_end ()
const_arg_iterator arg_begin () const
const_arg_iterator arg_end () const
Expr ** getArgs ()
const Expr *const * getArgs () const
unsigned getNumArgs () const
ExprgetArg (unsigned Arg)
 Return the specified argument.
const ExprgetArg (unsigned Arg) const
void setArg (unsigned Arg, Expr *ArgExpr)
 Set the specified argument.
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
SourceRange getParenOrBraceRange () const
void setParenOrBraceRange (SourceRange Range)
child_range children ()

Static Public Member Functions

static CXXConstructExprCreate (const ASTContext &C, QualType T, SourceLocation Loc, CXXConstructorDecl *D, bool Elidable, ArrayRef< Expr * > Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
static bool classof (const Stmt *T)

Protected Member Functions

 CXXConstructExpr (const ASTContext &C, StmtClass SC, QualType T, SourceLocation Loc, CXXConstructorDecl *d, bool elidable, ArrayRef< Expr * > Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, ConstructionKind ConstructKind, SourceRange ParenOrBraceRange)
 CXXConstructExpr (StmtClass SC, EmptyShell Empty)
 Construct an empty C++ construction expression.

Friends

class ASTStmtReader

Detailed Description

Represents a call to a C++ constructor.

Definition at line 1068 of file ExprCXX.h.


Member Typedef Documentation

Definition at line 1175 of file ExprCXX.h.

Definition at line 1172 of file ExprCXX.h.

typedef llvm::iterator_range<arg_iterator> clang::CXXConstructExpr::arg_range

Definition at line 1174 of file ExprCXX.h.

Definition at line 1173 of file ExprCXX.h.


Member Enumeration Documentation

Enumerator:
CK_Complete 
CK_NonVirtualBase 
CK_VirtualBase 
CK_Delegating 

Definition at line 1070 of file ExprCXX.h.


Constructor & Destructor Documentation

CXXConstructExpr::CXXConstructExpr ( const ASTContext C,
StmtClass  SC,
QualType  T,
SourceLocation  Loc,
CXXConstructorDecl d,
bool  elidable,
ArrayRef< Expr * >  Args,
bool  HadMultipleCandidates,
bool  ListInitialization,
bool  StdInitListInitialization,
bool  ZeroInitialization,
ConstructionKind  ConstructKind,
SourceRange  ParenOrBraceRange 
) [protected]
clang::CXXConstructExpr::CXXConstructExpr ( StmtClass  SC,
EmptyShell  Empty 
) [inline, protected]

Construct an empty C++ construction expression.

Definition at line 1104 of file ExprCXX.h.

Construct an empty C++ construction expression.

Definition at line 1112 of file ExprCXX.h.


Member Function Documentation

Definition at line 1184 of file ExprCXX.h.

Definition at line 1185 of file ExprCXX.h.

Definition at line 1177 of file ExprCXX.h.

References arg_begin(), and arg_end().

Definition at line 1178 of file ExprCXX.h.

References arg_begin(), and arg_end().

Reimplemented from clang::Stmt.

Definition at line 1220 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 1214 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

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

Definition at line 1198 of file ExprCXX.h.

Definition at line 1187 of file ExprCXX.h.

Referenced by getArgs().

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

Definition at line 1188 of file ExprCXX.h.

References getArgs().

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

Definition at line 1165 of file ExprCXX.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), mayInlineCallKind(), and clang::ento::ExprEngine::VisitCXXConstructExpr().

Definition at line 1133 of file ExprCXX.h.

Reimplemented from clang::Stmt.

Reimplemented in clang::CXXTemporaryObjectExpr.

Definition at line 482 of file ExprCXX.cpp.

Definition at line 1211 of file ExprCXX.h.

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

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

Definition at line 1142 of file ExprCXX.h.

Whether this construction is elidable.

Definition at line 1137 of file ExprCXX.h.

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

Whether this constructor call was written as list-initialization.

Definition at line 1146 of file ExprCXX.h.

Whether this constructor call was written as list-initialization, but was interpreted as forming a std::initializer_list<T> from the list and passing that as a single constructor argument. See C++11 [over.match.list]p1 bullet 1.

Definition at line 1153 of file ExprCXX.h.

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

Definition at line 1158 of file ExprCXX.h.

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

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

Set the specified argument.

Definition at line 1204 of file ExprCXX.h.

Definition at line 1168 of file ExprCXX.h.

Definition at line 1131 of file ExprCXX.h.

References AttributeLangSupport::C.

Definition at line 1138 of file ExprCXX.h.

Definition at line 1143 of file ExprCXX.h.

Definition at line 1147 of file ExprCXX.h.

Definition at line 1134 of file ExprCXX.h.

Definition at line 1212 of file ExprCXX.h.

Definition at line 1159 of file ExprCXX.h.

Definition at line 1154 of file ExprCXX.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Reimplemented in clang::CXXTemporaryObjectExpr.

Definition at line 1224 of file ExprCXX.h.


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