]> granicus.if.org Git - clang/commitdiff
Make the CXXConstructExpr public and add a StmtClass to it. No functionality change.
authorAnders Carlsson <andersca@mac.com>
Fri, 24 Apr 2009 05:04:04 +0000 (05:04 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 24 Apr 2009 05:04:04 +0000 (05:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69954 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ExprCXX.h
lib/AST/ExprCXX.cpp

index 7daaa8abbc4704bce9c9ec0085b6596cca6b66cc..9d3710a2a61c72eca8a56762384898fd5004ada6 100644 (file)
@@ -379,7 +379,6 @@ public:
   virtual child_iterator child_end();
 };
 
-
 /// CXXConstructExpr - Represents a call to a C++ constructor.
 class CXXConstructExpr : public Expr {
   VarDecl *VD;
@@ -390,11 +389,13 @@ class CXXConstructExpr : public Expr {
   Stmt **Args;
   unsigned NumArgs;
 
-  CXXConstructExpr(ASTContext &C, VarDecl *vd, QualType T, 
-                   CXXConstructorDecl *d, bool elidable,
-                   Expr **args, unsigned numargs);
   ~CXXConstructExpr() { } 
   
+protected:
+  CXXConstructExpr(ASTContext &C, StmtClass SC, VarDecl *vd, QualType T, 
+                   CXXConstructorDecl *d, bool elidable,
+                   Expr **args, unsigned numargs);
+
 public:
   static CXXConstructExpr *Create(ASTContext &C, VarDecl *VD, QualType T,
                                   CXXConstructorDecl *D, bool Elidable, 
index 1e96395d4679d44453a6aecfc157d0ac46f87dc9..e0a988bf669442d873f3d67df3478eafc7b4ac33 100644 (file)
@@ -258,14 +258,15 @@ CXXConstructExpr *CXXConstructExpr::Create(ASTContext &C, VarDecl *VD,
                                            QualType T, CXXConstructorDecl *D,  
                                            bool Elidable,
                                            Expr **Args, unsigned NumArgs) {
-  return new (C) CXXConstructExpr(C, VD, T, D, Elidable, Args, NumArgs);
+  return new (C) CXXConstructExpr(C, CXXConstructExprClass, VD, T, D, Elidable, 
+                                  Args, NumArgs);
 }
 
-CXXConstructExpr::CXXConstructExpr(ASTContext &C, VarDecl *vd, 
+CXXConstructExpr::CXXConstructExpr(ASTContext &C, StmtClass SC, VarDecl *vd, 
                                    QualType T, CXXConstructorDecl *D, 
                                    bool elidable,
                                    Expr **args, unsigned numargs) 
-: Expr(CXXConstructExprClass, T,
+: Expr(SC, T,
        T->isDependentType(),
        (T->isDependentType() ||
         CallExpr::hasAnyValueDependentArguments(args, numargs))),