[clang] [clang][PAC] ptrauth_qualifier must be considered a feature (PR #153291)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 13 16:06:31 PDT 2025


efriedma-quic wrote:

Can we just drop the check from `__has_extension` handling?

It looks like that check dates back to the introduction of __has_extension (d5d410faa8cfbbf4e2ffc2f8aa470491a77fd843).  But it's a terrible idea for a lot of reasons: it adds a semantic effect to a flag which otherwise doesn't have any semantic effects, and even for extensions that *are* actually extensions, there are plenty of ways to suppress the diagnostic even in `pedantic-errors` mode.

(And as a practical matter, some large fraction of codebases that care about pedantic warnings probably use `-Werror -pedantic`, which doesn't have this effect, so it's not like we were even being consistent here.)

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


More information about the cfe-commits mailing list