<div dir="ltr">Sure. :) Review is based off the attachment I grabbed from here: <a href="http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150824/136904.html" target="_blank">http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150824/136904.html</a><div><br></div><div>A few nits:</div><div>- test/Sema/enable_if.cpp line 24: Please use __attribute__(( instead of __attribute((</div><div>- Can we have a similar test for a function that returns an Incomplete? </div><div><br></div><div>George</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 16, 2015 at 1:30 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">+gbiv, would you be able to review this?</p>
<div class="gmail_quote">On Sep 14, 2015 7:42 AM, "Ettore Speziale" <<a href="mailto:speziale.ettore@gmail.com" target="_blank">speziale.ettore@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ping<br>
<br>
> Gently ping.<br>
><br>
>> On Aug 26, 2015, at 2:40 PM, Ettore Speziale <<a href="mailto:speziale.ettore@gmail.com" target="_blank">speziale.ettore@gmail.com</a>> wrote:<br>
>><br>
>> Forward to the right ML:<br>
>><br>
>>>> Sorry about the extreme delay. This patch slipped through the cracks, and I only noticed it again when searching my email for enable_if. Committed in r245985! In the future, please feel free to continue pinging weekly!<br>
>>><br>
>>> NP, thank you for committing the patch.<br>
>>><br>
>>> Unfortunately it contains a little error in the case of no candidate has been found. For instance consider the following test case:<br>
>>><br>
>>> struct Incomplete;<br>
>>><br>
>>> struct X {<br>
>>> void hidden_by_argument_conversion(Incomplete n, int m = 0) __attribute((enable_if(m == 10, "chosen when 'm' is ten")));<br>
>>> };<br>
>>><br>
>>> x.hidden_by_argument_conversion(10);<br>
>>><br>
>>> I would expect to get an error about Incomplete, as the compiler cannot understand how to convert 10 into an instance of Incomplete. However right now the enable_if diagnostic is emitted, thus masking the more useful message about Incomplete.<br>
>>><br>
>>> The attached patch solved the problem by delaying the point where the enable_if diagnostic is issued.<br>
>>><br>
>>> Thanks,<br>
>>> Ettore Speziale<br>
>><br>
>><br>
>> <enable_if.diff><br>
><br>
<br>
</blockquote></div>
</blockquote></div><br></div>