[clang] [Clang] Allow the use of [[gnu::visibility]] with #pragma clang attribute (PR #145653)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 25 06:59:18 PDT 2025


AaronBallman wrote:

This is missing test coverage for the interesting cases.

I'm a bit worried about how easy it will be to apply this attribute in unexpected places. e.g., it will apply to member functions as well as free functions, will anyone expect that though? It also applies to special functions like `main`, though that's more a question of the attribute and less about the pragma.

What's the behavior going to be in C when you get an implicit function declaration in C89 mode? Does that declaration then pick up this attribute as well? How about other special member functions we define on behalf of the user?

https://github.com/llvm/llvm-project/pull/145653


More information about the cfe-commits mailing list