<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 7, 2013, at 8:39 PM, Alexander Zinenko <<a href="mailto:ftynse@gmail.com">ftynse@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Ping?</div></blockquote><div><br></div><div>+bool Sema::SameTypesOrCompatibleFunctions(QualType Param,</div><div>+                                          QualType Arg) {</div><div><br></div><div>We're starting function names with a lowercase letter now. How about calling this isSameOrCompatibleFunctionType?</div><div><br></div><div><div>+  if (!ParamFunction || !ArgFunction)</div><div>+    return Param == Arg;</div><div><br></div><div>Please change the parameters to CanQualTypes, because these == operations only work because we know we're getting canonical types, and that's not clear from the interface.</div><div><br></div><div>+  if (IsNoReturnConversion(Param, Arg, AdjustedParam))</div><div><div>+    return Arg == AdjustedParam;</div></div><div><br></div><div>You'll probably need to recanonicalize AdjustedParam here.</div><div><br></div><div><div>+  // TODO(ftynse): Compatible calling conventions.</div><div>+  </div></div><div>Usually we just write "FIXME: what we need to fix"</div><div><br></div><div>Otherwise, this patch looks great!</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br></div><div><br></div></div><blockquote type="cite"><div class="gmail_extra"><br><div class="gmail_quote">On 26 February 2013 23:26, Alexander Zinenko <span dir="ltr"><<a href="mailto:ftynse@gmail.com" target="_blank">ftynse@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">Hello, John!<div><br></div><div>Thanks for your comments!</div><div>I introduced a flag that allows noreturn mismatches only if template deduction is called during overload resolution.  It allowed also to use function calls only in these cases while just comparing pointers in all the other cases.</div>


<div><br></div><div>Just comparing types will not work unless noreturn and non-noreturn functions have the same type, but this is not the thing we want according to the recent discussion on PR15105.  While it is possible to build a similar function type without noreturn and compare against it, this would not work for implicit default calling conventions that require the same logic in overload as noreturn functions.</div>


<div><br></div><div>Is this patch better?</div><div><br></div><div>--</div><div>Alex</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 26 February 2013 02:48, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Feb 25, 2013, at 8:34 AM, Alexander Zinenko <<a href="mailto:ftynse@gmail.com" target="_blank">ftynse@gmail.com</a>> wrote:<br>



> This patch allows function templates with GNU noreturn attribute to participate in overload resolution as non-noreturn ones.  Same behavior is allowed for functions now.<br>
> The patch only allows deducing such types since the necessary adjustments are already performed in corresponding functions (like in IsStandardConversion).<br>
<br>
</div>This function does a lot of work to make sure that the final equality comparison is a (fast) pointer equality test, and you're replacing it with a (slow) function call.<br>
<br>
Also, we definitely don't want to allow noreturn mismatches in every context.<br>
<span><font color="#888888"><br>
John.<br>
<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
<span><PR15291.patch></span>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote></div><br></body></html>