<div dir="ltr">On Tue, Jul 8, 2014 at 6:05 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="">On Sun, Jul 6, 2014 at 12:16 PM, Ehsan Akhgari <span dir="ltr"><<a href="mailto:ehsan.akhgari@gmail.com" target="_blank">ehsan.akhgari@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi doug.gregor,<br>
<br>
If during constructing a standard conversion sequence, we resolve an<br>
overload, we need to adjust the from type in the SCS according to the<br>
resolved operator.<br>
<br>
I found this bug when debugging PR20218.  It doesn't completely fix that<br>
test case though.<br></blockquote><div><br></div></div><div>The fix looks correct, but please provide some kind of test case for this patch (even if it doesn't solve PR20218's test case).</div><div></div></div></div>

</div></blockquote><div><br></div><div>I tried to do that, but I wasn't able to write a simpler test case similar to that of PR20218 which would have an observable outcome different after this patch...  Any ideas how I can write a good test case for this?<br>

</div><div><br>Thanks!<br clear="all"><div>--<br>Ehsan<br><<a href="http://ehsanakhgari.org/">http://ehsanakhgari.org/</a>></div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">

<a href="http://reviews.llvm.org/D4402" target="_blank">http://reviews.llvm.org/D4402</a><br>
<br>
Files:<br>
  lib/Sema/SemaOverload.cpp<br>
<br>
Index: lib/Sema/SemaOverload.cpp<br>
===================================================================<br>
--- lib/Sema/SemaOverload.cpp<br>
+++ lib/Sema/SemaOverload.cpp<br>
@@ -1462,6 +1462,7 @@<br>
       // We were able to resolve the address of the overloaded function,<br>
       // so we can convert to the type of that function.<br>
       FromType = Fn->getType();<br>
+      SCS.setFromType(FromType);<br>
<br>
       // we can sometimes resolve &foo<int> regardless of ToType, so check<br>
       // if the type matches (identity) or we are converting to bool<br>
<br></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">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>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div></div>