diff options
author | Anders Carlsson <andersca@mac.com> | 2009-04-24 04:57:02 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-04-24 04:57:02 +0000 |
commit | 15ef2b5820f9daccc44b9e847163b705b6f5863b (patch) | |
tree | 413ad7fc81a52896b0b489dfcc91e603a488f4e5 | |
parent | 3ed294522653323e4867a2eba03acc98a99e5479 (diff) |
Move the CXXConstructExpr before the CXXTemporaryObjectExpr so that the temporary object expr can inherit from the construct expr. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69953 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/ExprCXX.h | 95 |
1 files changed, 48 insertions, 47 deletions
diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index 6ef7513e05..7daaa8abbc 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -379,6 +379,54 @@ public: virtual child_iterator child_end(); }; + +/// CXXConstructExpr - Represents a call to a C++ constructor. +class CXXConstructExpr : public Expr { + VarDecl *VD; + CXXConstructorDecl *Constructor; + + bool Elidable; + + Stmt **Args; + unsigned NumArgs; + + CXXConstructExpr(ASTContext &C, VarDecl *vd, QualType T, + CXXConstructorDecl *d, bool elidable, + Expr **args, unsigned numargs); + ~CXXConstructExpr() { } + +public: + static CXXConstructExpr *Create(ASTContext &C, VarDecl *VD, QualType T, + CXXConstructorDecl *D, bool Elidable, + Expr **Args, unsigned NumArgs); + + void Destroy(ASTContext &C); + + const VarDecl* getVarDecl() const { return VD; } + const CXXConstructorDecl* getConstructor() const { return Constructor; } + + typedef ExprIterator arg_iterator; + typedef ConstExprIterator const_arg_iterator; + + arg_iterator arg_begin() { return Args; } + arg_iterator arg_end() { return Args + NumArgs; } + const_arg_iterator arg_begin() const { return Args; } + const_arg_iterator arg_end() const { return Args + NumArgs; } + + unsigned getNumArgs() const { return NumArgs; } + + virtual SourceRange getSourceRange() const { return SourceRange(); } + + static bool classof(const Stmt *T) { + return T->getStmtClass() == CXXConstructExprClass; + } + static bool classof(const CXXConstructExpr *) { return true; } + + // Iterators + virtual child_iterator child_begin(); + virtual child_iterator child_end(); +}; + /// CXXFunctionalCastExpr - Represents an explicit C++ type conversion /// that uses "functional" notion (C++ [expr.type.conv]). Example: @c /// x = int(0.5); @@ -890,53 +938,6 @@ public: virtual StmtIterator child_end(); }; -/// CXXConstructExpr - Represents a call to a C++ constructor. -class CXXConstructExpr : public Expr { - VarDecl *VD; - CXXConstructorDecl *Constructor; - - bool Elidable; - - Stmt **Args; - unsigned NumArgs; - - CXXConstructExpr(ASTContext &C, VarDecl *vd, QualType T, - CXXConstructorDecl *d, bool elidable, - Expr **args, unsigned numargs); - ~CXXConstructExpr() { } - -public: - static CXXConstructExpr *Create(ASTContext &C, VarDecl *VD, QualType T, - CXXConstructorDecl *D, bool Elidable, - Expr **Args, unsigned NumArgs); - - void Destroy(ASTContext &C); - - const VarDecl* getVarDecl() const { return VD; } - const CXXConstructorDecl* getConstructor() const { return Constructor; } - - typedef ExprIterator arg_iterator; - typedef ConstExprIterator const_arg_iterator; - - arg_iterator arg_begin() { return Args; } - arg_iterator arg_end() { return Args + NumArgs; } - const_arg_iterator arg_begin() const { return Args; } - const_arg_iterator arg_end() const { return Args + NumArgs; } - - unsigned getNumArgs() const { return NumArgs; } - - virtual SourceRange getSourceRange() const { return SourceRange(); } - - static bool classof(const Stmt *T) { - return T->getStmtClass() == CXXConstructExprClass; - } - static bool classof(const CXXConstructExpr *) { return true; } - - // Iterators - virtual child_iterator child_begin(); - virtual child_iterator child_end(); -}; - /// CXXDestroyExpr - Represents an implicit call to a C++ destructor. class CXXDestroyExpr : public Expr { VarDecl *VD; |