[clang] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 27 09:10:26 PDT 2025
higher-performance wrote:
> I don't think this is a good idea, warning on EVERY use of this is incorrect in system headers. IT is going to result in a ton of we-want-to-be-suppressed-positives
Thanks @erichkeane. I think I fundamentally disagree with this. The entire intention of this attribute is to flag such a thing -- it's no different from calling `std::invoke(foo, x)` and expecting to get a diagnostic on *every* invocation when the function is `void foo(int x, int y)`, especially when you consider that these are basically simulating named-parameters. Do you have a plausible use case in mind that makes you believe people would actually want to suppress the warning in system headers?
https://github.com/llvm/llvm-project/pull/141133
More information about the cfe-commits
mailing list