A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/llvm/llvm-project/issues/53805 below:

The overloadable attribute is sensitive to the syntactic position of the attribute · Issue #53805 · llvm/llvm-project · GitHub

Consider:

__attribute__((overloadable)) void func_bad(...); // error

void func_good(...) __attribute__((overloadable)); // okay

[[clang::overloadable]] void func_also_bad(...); // error
void func_also_bad_again(...) [[clang::overloadable]]; // error, this is the only diagnostic that makes sense to me

void okay_now_Im_just_baffled [[clang::overloadable]](...); // okay

The only diagnostic that makes sense (to me) is the one on func_also_bad_again() due to it being written in the type position and not being a type attribute.

https://godbolt.org/z/7qWjWdbGP is a live example. I think the two cases labeled error with no other comments should also be accepted.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4