Hi John, OK for 3.3 branch?<br><br><div class="gmail_quote">On Thu, May 23, 2013 at 2:54 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard-llvm@metafoo.co.uk" target="_blank">richard-llvm@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rsmith<br>
Date: Thu May 23 16:54:14 2013<br>
New Revision: 182615<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=182615&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=182615&view=rev</a><br>
Log:<br>
Fix assert on temporary std::initializer_list.<br>
<br>
Modified:<br>
cfe/trunk/lib/CodeGen/CGExprAgg.cpp<br>
cfe/trunk/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=182615&r1=182614&r2=182615&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=182615&r1=182614&r2=182615&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Thu May 23 16:54:14 2013<br>
@@ -1159,12 +1159,13 @@ void AggExprEmitter::VisitInitListExpr(I<br>
if (E->hadArrayRangeDesignator())<br>
CGF.ErrorUnsupported(E, "GNU array range designator extension");<br>
<br>
+ AggValueSlot Dest = EnsureSlot(E->getType());<br>
+<br>
if (E->initializesStdInitializerList()) {<br>
EmitStdInitializerList(Dest.getAddr(), E);<br>
return;<br>
}<br>
<br>
- AggValueSlot Dest = EnsureSlot(E->getType());<br>
LValue DestLV = CGF.MakeAddrLValue(Dest.getAddr(), E->getType(),<br>
Dest.getAlignment());<br>
<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp?rev=182615&r1=182614&r2=182615&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp?rev=182615&r1=182614&r2=182615&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp Thu May 23 16:54:14 2013<br>
@@ -275,3 +275,13 @@ namespace rdar13325066 {<br>
for (X x : { x1, x2 }) { }<br>
}<br>
}<br>
+<br>
+namespace dtors {<br>
+ struct S {<br>
+ S();<br>
+ ~S();<br>
+ };<br>
+ void f() {<br>
+ std::initializer_list<S>{ S(), S() };<br>
+ }<br>
+}<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br>