]> granicus.if.org Git - clang/commitdiff
Add an ASTContext parameter to CXXTemporaryObjectExpr.
authorAnders Carlsson <andersca@mac.com>
Fri, 24 Apr 2009 05:44:25 +0000 (05:44 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 24 Apr 2009 05:44:25 +0000 (05:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69959 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 9c948f9f825e95d2cc087893cd91895020e6be2a..631c5598023949f467fe936a1acb2d44e5b7dde8 100644 (file)
@@ -480,7 +480,7 @@ class CXXTemporaryObjectExpr : public Expr {
   unsigned NumArgs;
 
 public:
-  CXXTemporaryObjectExpr(VarDecl *vd, 
+  CXXTemporaryObjectExpr(ASTContext &C, VarDecl *vd, 
                          CXXConstructorDecl *Cons, QualType writtenTy,
                          SourceLocation tyBeginLoc, Expr **Args,
                          unsigned NumArgs, SourceLocation rParenLoc);
index 01290d94722aaae44de5e1e2e0d3e8a375cadc4f..b109d7a840c7c4b36782ac22285a3aaf66a2158c 100644 (file)
@@ -231,7 +231,7 @@ const char *CXXNamedCastExpr::getCastName() const {
   }
 }
 
-CXXTemporaryObjectExpr::CXXTemporaryObjectExpr(VarDecl *vd,
+CXXTemporaryObjectExpr::CXXTemporaryObjectExpr(ASTContext &C, VarDecl *vd,
                                                CXXConstructorDecl *Cons,
                                                QualType writtenTy,
                                                SourceLocation tyBeginLoc, 
index 753d1e47ba38a2dcec3f943325239178101acc66..753fd5efc1bb7e7994bee86560ecfe0c3c9883c0 100644 (file)
@@ -131,7 +131,8 @@ Sema::ActOnCXXTypeConstructExpr(SourceRange TypeRange, TypeTy *TypeRep,
     
     // FIXME: Is this correct?
     CXXTempVarDecl *Temp = CXXTempVarDecl::Create(Context, CurContext, Ty);
-    return Owned(new (Context) CXXTemporaryObjectExpr(Temp, 0, Ty, TyBeginLoc,
+    return Owned(new (Context) CXXTemporaryObjectExpr(Context, Temp, 0, Ty, 
+                                                      TyBeginLoc,
                                                       Exprs, NumExprs,
                                                       RParenLoc));
   }
@@ -169,7 +170,8 @@ Sema::ActOnCXXTypeConstructExpr(SourceRange TypeRange, TypeTy *TypeRep,
       CXXTempVarDecl *Temp = CXXTempVarDecl::Create(Context, CurContext, Ty);
 
       exprs.release();
-      return Owned(new (Context) CXXTemporaryObjectExpr(Temp, Constructor, Ty,
+      return Owned(new (Context) CXXTemporaryObjectExpr(Context, Temp, 
+                                                        Constructor, Ty,
                                                         TyBeginLoc,  Exprs,
                                                         NumExprs, RParenLoc));
     }