From: Anders Carlsson Date: Sat, 30 May 2009 20:52:37 +0000 (+0000) Subject: Bind temporaries correctly when instantiating expressions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=464f4f327a218725a1a3f0756ef8f17d7a2b48f0;p=clang Bind temporaries correctly when instantiating expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72632 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaTemplateInstantiateExpr.cpp b/lib/Sema/SemaTemplateInstantiateExpr.cpp index 3b28813a72..c37bf2b2c4 100644 --- a/lib/Sema/SemaTemplateInstantiateExpr.cpp +++ b/lib/Sema/SemaTemplateInstantiateExpr.cpp @@ -982,7 +982,7 @@ TemplateExprInstantiator::VisitCXXBindTemporaryExpr( if (SubExpr.isInvalid()) return SemaRef.ExprError(); - return move(SubExpr); + return SemaRef.MaybeBindToTemporary(SubExpr.takeAs()); } Sema::OwningExprResult