[cfe-commits] r69957 - in /cfe/trunk: include/clang/AST/ExprCXX.h lib/AST/ExprCXX.cpp lib/Sema/SemaExprCXX.cpp
Anders Carlsson
andersca at mac.com
Thu Apr 23 22:23:13 PDT 2009
Author: andersca
Date: Fri Apr 24 00:23:13 2009
New Revision: 69957
URL: http://llvm.org/viewvc/llvm-project?rev=69957&view=rev
Log:
Add a VarDecl parameter to the CXXTemporaryObjectExpr constructor. It's unused for now, so no functionality change yet. Also, create CXXTempVarDecls to pass to the CXXTemporaryObjectExpr ctor.
Modified:
cfe/trunk/include/clang/AST/ExprCXX.h
cfe/trunk/lib/AST/ExprCXX.cpp
cfe/trunk/lib/Sema/SemaExprCXX.cpp
Modified: cfe/trunk/include/clang/AST/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprCXX.h?rev=69957&r1=69956&r2=69957&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/trunk/include/clang/AST/ExprCXX.h Fri Apr 24 00:23:13 2009
@@ -480,7 +480,8 @@
unsigned NumArgs;
public:
- CXXTemporaryObjectExpr(CXXConstructorDecl *Cons, QualType writtenTy,
+ CXXTemporaryObjectExpr(VarDecl *vd,
+ CXXConstructorDecl *Cons, QualType writtenTy,
SourceLocation tyBeginLoc, Expr **Args,
unsigned NumArgs, SourceLocation rParenLoc);
Modified: cfe/trunk/lib/AST/ExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprCXX.cpp?rev=69957&r1=69956&r2=69957&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprCXX.cpp (original)
+++ cfe/trunk/lib/AST/ExprCXX.cpp Fri Apr 24 00:23:13 2009
@@ -231,7 +231,8 @@
}
}
-CXXTemporaryObjectExpr::CXXTemporaryObjectExpr(CXXConstructorDecl *Cons,
+CXXTemporaryObjectExpr::CXXTemporaryObjectExpr(VarDecl *vd,
+ CXXConstructorDecl *Cons,
QualType writtenTy,
SourceLocation tyBeginLoc,
Expr **Args,
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=69957&r1=69956&r2=69957&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Fri Apr 24 00:23:13 2009
@@ -128,7 +128,10 @@
if (Ty->isDependentType() ||
CallExpr::hasAnyTypeDependentArguments(Exprs, NumExprs)) {
exprs.release();
- return Owned(new (Context) CXXTemporaryObjectExpr(0, Ty, TyBeginLoc,
+
+ // FIXME: Is this correct?
+ CXXTempVarDecl *Temp = CXXTempVarDecl::Create(Context, CurContext, Ty);
+ return Owned(new (Context) CXXTemporaryObjectExpr(Temp, 0, Ty, TyBeginLoc,
Exprs, NumExprs,
RParenLoc));
}
@@ -163,8 +166,10 @@
if (!Constructor)
return ExprError();
+ CXXTempVarDecl *Temp = CXXTempVarDecl::Create(Context, CurContext, Ty);
+
exprs.release();
- return Owned(new (Context) CXXTemporaryObjectExpr(Constructor, Ty,
+ return Owned(new (Context) CXXTemporaryObjectExpr(Temp, Constructor, Ty,
TyBeginLoc, Exprs,
NumExprs, RParenLoc));
}
More information about the cfe-commits
mailing list