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

Richard Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 17:49:45 PDT 2017

rsmith added a comment.

I'd like to suggest an alternative design: don't add a new attribute., and instead change the semantics of `__attribute__((overloadable))` to permit at most one non-overloadable function in an overload set. That one function would implicitly get the `transparently_overloadable` semantics: it can be overloaded by `overloadable` functions and doesn't get a mangled name. This is basically exactly how extern "C" and extern "C++" functions overload in C++: you can have up to one extern "C" function plus as many (overloadable) C++ functions as you like.

Does that seem reasonable? Or is there some reason we need or want an explicit attribute for this case?


More information about the cfe-commits mailing list