[cfe-commits] r69953 - /cfe/trunk/include/clang/AST/ExprCXX.h

Anders Carlsson andersca at mac.com
Thu Apr 23 21:57:03 PDT 2009


Author: andersca
Date: Thu Apr 23 23:57:02 2009
New Revision: 69953

URL: http://llvm.org/viewvc/llvm-project?rev=69953&view=rev
Log:
Move the CXXConstructExpr before the CXXTemporaryObjectExpr so that the temporary object expr can inherit from the construct expr. No functionality change.

Modified:
    cfe/trunk/include/clang/AST/ExprCXX.h

Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=69953&r1=69952&r2=69953&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Thu Apr 23 23:57:02 2009
@@ -379,6 +379,54 @@
   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 @@
   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;





More information about the cfe-commits mailing list