clang API Documentation
Represents a call to a C++ constructor. More...
#include <ExprCXX.h>
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. | |
CXXConstructorDecl * | getConstructor () 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 |
Expr * | getArg (unsigned Arg) |
Return the specified argument. | |
const Expr * | getArg (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 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 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 |
typedef llvm::iterator_range<const_arg_iterator> clang::CXXConstructExpr::arg_const_range |
typedef llvm::iterator_range<arg_iterator> clang::CXXConstructExpr::arg_range |
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] |
Definition at line 852 of file ExprCXX.cpp.
References AttributeLangSupport::C, clang::Expr::containsUnexpandedParameterPack(), clang::Stmt::ExprBits, clang::Expr::isInstantiationDependent(), and clang::Expr::isValueDependent().
Referenced by Create().
clang::CXXConstructExpr::CXXConstructExpr | ( | StmtClass | SC, |
EmptyShell | Empty | ||
) | [inline, protected] |
clang::CXXConstructExpr::CXXConstructExpr | ( | EmptyShell | Empty | ) | [inline, explicit] |
arg_iterator clang::CXXConstructExpr::arg_begin | ( | ) | [inline] |
Definition at line 1182 of file ExprCXX.h.
Referenced by arguments(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), and clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall().
const_arg_iterator clang::CXXConstructExpr::arg_begin | ( | ) | const [inline] |
arg_iterator clang::CXXConstructExpr::arg_end | ( | ) | [inline] |
Definition at line 1183 of file ExprCXX.h.
Referenced by arguments(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), and clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall().
const_arg_iterator clang::CXXConstructExpr::arg_end | ( | ) | const [inline] |
arg_range clang::CXXConstructExpr::arguments | ( | ) | [inline] |
Definition at line 1177 of file ExprCXX.h.
References arg_begin(), and arg_end().
arg_const_range clang::CXXConstructExpr::arguments | ( | ) | const [inline] |
Definition at line 1178 of file ExprCXX.h.
References arg_begin(), and arg_end().
child_range clang::CXXConstructExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
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] |
Definition at line 834 of file ExprCXX.cpp.
References AttributeLangSupport::C, and CXXConstructExpr().
Referenced by clang::Sema::BuildCXXConstructExpr(), and clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction().
Expr* clang::CXXConstructExpr::getArg | ( | unsigned | Arg | ) | [inline] |
Return the specified argument.
Definition at line 1194 of file ExprCXX.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), getLocEnd(), clang::CXXTemporaryObjectExpr::getLocEnd(), clang::Expr::isConstantInitializer(), clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr(), and clang::threadSafety::BuildLockset::VisitCXXConstructExpr().
const Expr* clang::CXXConstructExpr::getArg | ( | unsigned | Arg | ) | const [inline] |
Expr** clang::CXXConstructExpr::getArgs | ( | ) | [inline] |
const Expr* const* clang::CXXConstructExpr::getArgs | ( | ) | const [inline] |
ConstructionKind clang::CXXConstructExpr::getConstructionKind | ( | ) | const [inline] |
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().
CXXConstructorDecl* clang::CXXConstructExpr::getConstructor | ( | ) | const [inline] |
Definition at line 1130 of file ExprCXX.h.
Referenced by clang::Sema::BuildExceptionDeclaration(), clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtor(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::Expr::HasSideEffects(), clang::Expr::isConstantInitializer(), ShouldDiagnoseUnusedDecl(), treatUnusedNewEscaped(), clang::ento::ExprEngine::VisitCXXConstructExpr(), clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr(), and clang::threadSafety::BuildLockset::VisitCXXConstructExpr().
SourceLocation clang::CXXConstructExpr::getLocation | ( | ) | const [inline] |
SourceLocation CXXConstructExpr::getLocEnd | ( | ) | const |
Reimplemented from clang::Stmt.
Reimplemented in clang::CXXTemporaryObjectExpr.
Definition at line 488 of file ExprCXX.cpp.
References getArg(), clang::SourceRange::getEnd(), clang::Stmt::getLocEnd(), getNumArgs(), clang::Expr::isDefaultArgument(), clang::SourceLocation::isValid(), and clang::SourceRange::isValid().
SourceLocation CXXConstructExpr::getLocStart | ( | ) | const |
Reimplemented from clang::Stmt.
Reimplemented in clang::CXXTemporaryObjectExpr.
Definition at line 482 of file ExprCXX.cpp.
unsigned clang::CXXConstructExpr::getNumArgs | ( | ) | const [inline] |
Definition at line 1191 of file ExprCXX.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), getLocEnd(), clang::CXXTemporaryObjectExpr::getLocEnd(), and clang::Expr::isConstantInitializer().
SourceRange clang::CXXConstructExpr::getParenOrBraceRange | ( | ) | const [inline] |
Definition at line 1211 of file ExprCXX.h.
Referenced by clang::CXXTemporaryObjectExpr::getLocEnd().
bool clang::CXXConstructExpr::hadMultipleCandidates | ( | ) | const [inline] |
bool clang::CXXConstructExpr::isElidable | ( | ) | const [inline] |
Whether this construction is elidable.
Definition at line 1137 of file ExprCXX.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), and ShouldDiagnoseUnusedDecl().
bool clang::CXXConstructExpr::isListInitialization | ( | ) | const [inline] |
bool clang::CXXConstructExpr::isStdInitListInitialization | ( | ) | const [inline] |
bool clang::CXXConstructExpr::requiresZeroInitialization | ( | ) | const [inline] |
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] |
void clang::CXXConstructExpr::setConstructionKind | ( | ConstructionKind | CK | ) | [inline] |
void clang::CXXConstructExpr::setConstructor | ( | CXXConstructorDecl * | C | ) | [inline] |
Definition at line 1131 of file ExprCXX.h.
References AttributeLangSupport::C.
void clang::CXXConstructExpr::setElidable | ( | bool | E | ) | [inline] |
void clang::CXXConstructExpr::setHadMultipleCandidates | ( | bool | V | ) | [inline] |
void clang::CXXConstructExpr::setListInitialization | ( | bool | V | ) | [inline] |
void clang::CXXConstructExpr::setLocation | ( | SourceLocation | Loc | ) | [inline] |
void clang::CXXConstructExpr::setParenOrBraceRange | ( | SourceRange | Range | ) | [inline] |
void clang::CXXConstructExpr::setRequiresZeroInitialization | ( | bool | ZeroInit | ) | [inline] |
void clang::CXXConstructExpr::setStdInitListInitialization | ( | bool | V | ) | [inline] |
friend class ASTStmtReader [friend] |
Reimplemented from clang::Stmt.
Reimplemented in clang::CXXTemporaryObjectExpr.