]> granicus.if.org Git - clang/commitdiff
Add the newly created temporary to the ExprTemporaries stack.
authorAnders Carlsson <andersca@mac.com>
Sat, 30 May 2009 21:21:49 +0000 (21:21 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 30 May 2009 21:21:49 +0000 (21:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72638 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExprCXX.cpp

index 5d18c3c9f22f1a5e1540cb01b4084a837e4ce592..641fcb7e1082a8fc97a8d000cdfed6fc228c7c7b 100644 (file)
@@ -1536,7 +1536,8 @@ Sema::OwningExprResult Sema::MaybeBindToTemporary(Expr *E) {
   
   CXXTemporary *Temp = CXXTemporary::Create(Context, 
                                             RD->getDestructor(Context));
-
+  ExprTemporaries.push_back(Temp);
+  
   // FIXME: Add the temporary to the temporaries vector.
   return Owned(CXXBindTemporaryExpr::Create(Context, Temp, E));
 }