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

George Burgess IV via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 18:23:01 PDT 2017


george.burgess.iv added a comment.

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

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.


https://reviews.llvm.org/D32332





More information about the cfe-commits mailing list