From: Anders Carlsson Date: Fri, 24 Apr 2009 05:44:25 +0000 (+0000) Subject: Add an ASTContext parameter to CXXTemporaryObjectExpr. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09c4abb1057f0eb53a9c2b5c2f22b1472362156e;p=clang Add an ASTContext parameter to CXXTemporaryObjectExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69959 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index 9c948f9f82..631c559802 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -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); diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index 01290d9472..b109d7a840 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -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, diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 753d1e47ba..753fd5efc1 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -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)); }