clang API Documentation
CXXConstructExpr - 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 |
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 | 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 |
| Expr * | getArg (unsigned Arg) |
| getArg - Return the specified argument. | |
| const Expr * | getArg (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 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 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 |
CXXConstructExpr - Represents a call to a C++ constructor.
| 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] |
Definition at line 719 of file ExprCXX.cpp.
References 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] |
Construct an empty C++ construction expression.
| clang::CXXConstructExpr::CXXConstructExpr | ( | EmptyShell | Empty | ) | [inline, explicit] |
Construct an empty C++ construction expression.
| arg_iterator clang::CXXConstructExpr::arg_begin | ( | ) | [inline] |
Definition at line 977 of file ExprCXX.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), and clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtor().
| const_arg_iterator clang::CXXConstructExpr::arg_begin | ( | ) | const [inline] |
| arg_iterator clang::CXXConstructExpr::arg_end | ( | ) | [inline] |
Definition at line 978 of file ExprCXX.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), and clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtor().
| const_arg_iterator clang::CXXConstructExpr::arg_end | ( | ) | const [inline] |
| 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 1004 of file ExprCXX.h.
References clang::Stmt::getStmtClass().
| static bool clang::CXXConstructExpr::classof | ( | const CXXConstructExpr * | ) | [inline, static] |
| 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] |
Definition at line 703 of file ExprCXX.cpp.
References CXXConstructExpr().
Referenced by clang::Sema::BuildCXXConstructExpr(), and clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction().
| 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] |
| 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] |
Definition at line 939 of file ExprCXX.h.
Referenced by clang::Sema::BuildExceptionDeclaration(), clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtor(), clang::Expr::isConstantInitializer(), ShouldDiagnoseUnusedDecl(), and clang::ento::ExprEngine::VisitCXXConstructExpr().
| SourceLocation clang::CXXConstructExpr::getLocation | ( | ) | const [inline] |
| unsigned clang::CXXConstructExpr::getNumArgs | ( | ) | const [inline] |
Definition at line 983 of file ExprCXX.h.
Referenced by getSourceRange(), clang::Expr::isConstantInitializer(), and clang::Sema::SubstInitializer().
| 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] |
| bool clang::CXXConstructExpr::isElidable | ( | ) | const [inline] |
Whether this construction is elidable.
Definition at line 946 of file ExprCXX.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructExpr(), clang::Expr::isConstantInitializer(), ShouldDiagnoseUnusedDecl(), and clang::ento::ExprEngine::VisitCXXConstructExpr().
| bool clang::CXXConstructExpr::isListInitialization | ( | ) | const [inline] |
| 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] |
| void clang::CXXConstructExpr::setConstructionKind | ( | ConstructionKind | CK | ) | [inline] |
| void clang::CXXConstructExpr::setConstructor | ( | CXXConstructorDecl * | C | ) | [inline] |
| 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::setRequiresZeroInitialization | ( | bool | ZeroInit | ) | [inline] |
friend class ASTStmtReader [friend] |
Reimplemented from clang::Stmt.
Reimplemented in clang::CXXTemporaryObjectExpr.