<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Eek. This would have been caught by -Wshadow, right? Can we rename the local Dest to something else?</div><div><br></div><div>Jordan</div><div><br></div><br><div><div>On May 23, 2013, at 14:54 , Richard Smith <<a href="mailto:richard-llvm@metafoo.co.uk">richard-llvm@metafoo.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Author: rsmith<br>Date: Thu May 23 16:54:14 2013<br>New Revision: 182615<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=182615&view=rev">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:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=182615&r1=182614&r2=182615&view=diff">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:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp?rev=182615&r1=182614&r2=182615&view=diff">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">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a></div></blockquote></div><br></body></html>