[PATCH] PR13457 (part 1) explicit/implicit calling conventions compatibility in overloads

Alexander Zinenko ftynse at gmail.com
Fri Mar 1 14:39:24 PST 2013


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.

The patch covers:
* pointers to free functions (__cdecl by default);
* references to free functions;
* pointers to static member functions and variadic member functions
(__cdecl by default);
* pointers to non-static non-variadic member functions (__thiscall by
* simultaneous calling convention adjustment and base-to-derived implicit
conversion for member functions.

The patch does not cover function templates, although the approach to this
is exactly the same as for PR15291.

I suppose functions for determining calling convention compatibility could
be moved somewhere in TargetCXXABI if needed in other places.

Please, review!
Suggestions are welcome.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130302/a7600cb5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 13457.patch
Type: application/octet-stream
Size: 34550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130302/a7600cb5/attachment.obj>

More information about the cfe-commits mailing list