<div dir="ltr">r276489. Thanks!<div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 22, 2016 at 3:17 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@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"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Fri, Jul 22, 2016 at 3:15 PM, George Burgess IV <span dir="ltr"><<a href="mailto:george.burgess.iv@gmail.com" target="_blank">george.burgess.iv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">(Assuming "yes" :) )<div><br></div><div>Richard, are you okay with this being merged into 3.9?</div></div></blockquote><div><br></div></span><div>Yes, LGTM for 3.9.</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 22, 2016 at 9:54 AM, George Burgess IV <span dir="ltr"><<a href="mailto:george.burgess.iv@gmail.com" target="_blank">george.burgess.iv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Error message says r<span style="color:rgb(0,0,0);white-space:pre-wrap">272936 had the error, so it looks like it would, yeah. :)</span><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Would you like me to merge it to the 3.9 branch?</span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 22, 2016 at 6:51 AM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Does this apply to 3.9?<br>
<div><div><br>
On Wed, Jul 20, 2016 at 11:28 PM, George Burgess IV via cfe-commits<br>
<<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br>
> Author: gbiv<br>
> Date: Wed Jul 20 22:28:13 2016<br>
> New Revision: 276232<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=276232&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=276232&view=rev</a><br>
> Log:<br>
> [Sema] Fix PR28623.<br>
><br>
> In atomic builtins, we assumed that the LValue conversion on the first<br>
> argument would succeed. So, we would crash given code like:<br>
><br>
> ```<br>
> void ovl(char);<br>
> void ovl(int);<br>
> __atomic_store_n(ovl, 0, 0);<br>
> ```<br>
><br>
> This patch makes us not assume that said conversion is successful. :)<br>
><br>
> Added:<br>
> cfe/trunk/test/SemaCXX/atomic-ops.cpp<br>
> Modified:<br>
> cfe/trunk/lib/Sema/SemaChecking.cpp<br>
><br>
> Modified: cfe/trunk/lib/Sema/SemaChecking.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=276232&r1=276231&r2=276232&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=276232&r1=276231&r2=276232&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/lib/Sema/SemaChecking.cpp (original)<br>
> +++ cfe/trunk/lib/Sema/SemaChecking.cpp Wed Jul 20 22:28:13 2016<br>
> @@ -2398,7 +2398,11 @@ ExprResult Sema::SemaAtomicOpsOverloaded<br>
><br>
> // Inspect the first argument of the atomic operation.<br>
> Expr *Ptr = TheCall->getArg(0);<br>
> - Ptr = DefaultFunctionArrayLvalueConversion(Ptr).get();<br>
> + ExprResult ConvertedPtr = DefaultFunctionArrayLvalueConversion(Ptr);<br>
> + if (ConvertedPtr.isInvalid())<br>
> + return ExprError();<br>
> +<br>
> + Ptr = ConvertedPtr.get();<br>
> const PointerType *pointerType = Ptr->getType()->getAs<PointerType>();<br>
> if (!pointerType) {<br>
> Diag(DRE->getLocStart(), diag::err_atomic_builtin_must_be_pointer)<br>
><br>
> Added: cfe/trunk/test/SemaCXX/atomic-ops.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/atomic-ops.cpp?rev=276232&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/atomic-ops.cpp?rev=276232&view=auto</a><br>
> ==============================================================================<br>
> --- cfe/trunk/test/SemaCXX/atomic-ops.cpp (added)<br>
> +++ cfe/trunk/test/SemaCXX/atomic-ops.cpp Wed Jul 20 22:28:13 2016<br>
> @@ -0,0 +1,9 @@<br>
> +// RUN: %clang_cc1 %s -verify -fsyntax-only -triple=i686-linux-gnu -std=c++11<br>
> +<br>
> +// We crashed when we couldn't properly convert the first arg of __atomic_* to<br>
> +// an lvalue.<br>
> +void PR28623() {<br>
> + void helper(int); // expected-note{{target}}<br>
> + void helper(char); // expected-note{{target}}<br>
> + __atomic_store_n(helper, 0, 0); // expected-error{{reference to overloaded function could not be resolved}}<br>
> +}<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div></div>