<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">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:0 0 0 .8ex;border-left:1px #ccc solid;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>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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<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>_______________________________________________<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>
<br></blockquote></div><br></div></div>