[PATCH] D32332: Add support for transparent overloadable functions in clang

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 12 04:47:10 PDT 2017

aaron.ballman added a comment.

In https://reviews.llvm.org/D32332#751785, @george.burgess.iv wrote:

> I'd be happy with that approach. Do you like it, Aaron?

I think that makes a lot of sense.

> FWIW, I did a bit of archaeology, and it looks like the commit that added the requirement that all overloads must have `overloadable` (r64414) did so to keep users from "trying to be too sneaky for their own good." The issue it was trying to solve was
>   double sin(double) __attribute__((overloadable));
>   #include <math.h>
>   // calls to `sin` are now mangled, which probably resulted in fun linker errors.
> If we go back to no longer requiring some spelling of `overloadable` on all (re)decls of this special non-mangled function, the above problem shouldn't reappear.


More information about the cfe-commits mailing list