From 8db68da43086c4205b1df1c35a3778c0ea32b9cd Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Fri, 13 Nov 2009 20:11:49 +0000 Subject: [PATCH] Clear temporaries in more places. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88687 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDeclCXX.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 247558b9c2..c3f3367d2d 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -1293,6 +1293,9 @@ Sema::SetBaseOrMemberInitializers(CXXConstructorDecl *Constructor, MarkDeclarationReferenced(Constructor->getLocation(), Ctor); + // FIXME: CXXBaseOrMemberInitializer should only contain a single + // subexpression so we can wrap it in a CXXExprWithTemporaries if necessary. + ExprTemporaries.clear(); CXXBaseOrMemberInitializer *Member = new (Context) CXXBaseOrMemberInitializer(VBase->getType(), CtorArgs.takeAs(), @@ -1343,6 +1346,9 @@ Sema::SetBaseOrMemberInitializers(CXXConstructorDecl *Constructor, MarkDeclarationReferenced(Constructor->getLocation(), Ctor); + // FIXME: CXXBaseOrMemberInitializer should only contain a single + // subexpression so we can wrap it in a CXXExprWithTemporaries if necessary. + ExprTemporaries.clear(); CXXBaseOrMemberInitializer *Member = new (Context) CXXBaseOrMemberInitializer(Base->getType(), CtorArgs.takeAs(), @@ -1413,6 +1419,9 @@ Sema::SetBaseOrMemberInitializers(CXXConstructorDecl *Constructor, Constructor->getLocation(), CtorArgs)) continue; + // FIXME: CXXBaseOrMemberInitializer should only contain a single + // subexpression so we can wrap it in a CXXExprWithTemporaries if necessary. + ExprTemporaries.clear(); CXXBaseOrMemberInitializer *Member = new (Context) CXXBaseOrMemberInitializer(*Field,CtorArgs.takeAs(), CtorArgs.size(), Ctor, -- 2.40.0