Files
clang-p2996/clang/test/CodeGen
George Burgess IV d3cf025ae2 [Sema] Allow unmarked overloadable functions.
This patch extends the `overloadable` attribute to allow for one
function with a given name to not be marked with the `overloadable`
attribute. The overload without the `overloadable` attribute will not
have its name mangled.

So, the following code is now legal:

  void foo(void) __attribute__((overloadable));
  void foo(int);
  void foo(float) __attribute__((overloadable));

In addition, this patch fixes a bug where we'd accept code with
`__attribute__((overloadable))` inconsistently applied. In other words,
we used to accept:

  void foo(void);
  void foo(void) __attribute__((overloadable));

But we will do this no longer, since it defeats the original purpose of
requiring `__attribute__((overloadable))` on all redeclarations of a
function.

This breakage seems to not be an issue in practice, since the only code
I could find that had this pattern often looked like:

  void foo(void);
  void foo(void) __attribute__((overloadable)) __asm__("foo");
  void foo(int) __attribute__((overloadable));

...Which can now be simplified by simply removing the asm label and
overloadable attribute from the redeclaration of `void foo(void);`

Differential Revision: https://reviews.llvm.org/D32332

llvm-svn: 306467
2017-06-27 21:31:31 +00:00
..
2017-05-04 08:37:59 +00:00
2016-11-09 17:02:07 +00:00
2016-06-14 21:02:05 +00:00
2016-04-28 14:13:28 +00:00
2017-04-04 15:44:06 +00:00
2017-04-04 15:44:06 +00:00
2017-04-04 15:44:06 +00:00
2017-04-04 15:44:06 +00:00
2017-01-31 17:00:35 +00:00
2017-04-04 21:18:36 +00:00
2017-03-31 13:48:18 +00:00
2016-05-04 23:37:40 +00:00
2016-06-14 21:02:05 +00:00
2016-09-16 22:56:12 +00:00
2016-05-19 17:47:47 +00:00
2016-06-14 21:02:05 +00:00
2017-05-23 00:35:09 +00:00
2016-06-24 13:11:15 +00:00
2017-06-23 21:12:56 +00:00
2016-06-14 21:02:05 +00:00