On Fri, Mar 1, 2013 at 2:39 PM, Alexander Zinenko <span dir="ltr"><<a href="mailto:ftynse@gmail.com" target="_blank">ftynse@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello!<div><br></div><div>This patch addresses the compatibility issue between explicitly specified default calling conventions and implicit ones in overload resolution. As of now, such implicit conversions are only known in Microsoft ABI. The corresponding CodeGen already knows about these implicit defaults, so the conversion kind could be just NoOp.</div>
<div><br></div><div>The patch covers:</div><div>* pointers to free functions (__cdecl by default);</div><div>* references to free functions;</div><div>* pointers to static member functions and variadic member functions (__cdecl by default);</div>
<div>* pointers to non-static non-variadic member functions (__thiscall by default);</div><div>* simultaneous calling convention adjustment and base-to-derived implicit conversion for member functions.</div><div>
<br></div><div>The patch does not cover function templates, although the approach to this is exactly the same as for PR15291.</div><div><br></div><div>I suppose functions for determining calling convention compatibility could be moved somewhere in TargetCXXABI if needed in other places.</div>
<div><br></div><div>Please, review!</div><div>Suggestions are welcome.</div></div></blockquote><div><br></div><div>This seems rather more brute force than is required. Could you instead transform CC_Default to Context.getTargetInfo().getDefaultCallingConv(...) in the relevant places?</div>
</div>