unsigned NumArgs;
public:
- CXXTemporaryObjectExpr(CXXConstructorDecl *Cons, QualType writtenTy,
+ CXXTemporaryObjectExpr(VarDecl *vd,
+ CXXConstructorDecl *Cons, QualType writtenTy,
SourceLocation tyBeginLoc, Expr **Args,
unsigned NumArgs, SourceLocation rParenLoc);
}
}
-CXXTemporaryObjectExpr::CXXTemporaryObjectExpr(CXXConstructorDecl *Cons,
+CXXTemporaryObjectExpr::CXXTemporaryObjectExpr(VarDecl *vd,
+ CXXConstructorDecl *Cons,
QualType writtenTy,
SourceLocation tyBeginLoc,
Expr **Args,
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));
}
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));
}