[clang] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue May 27 13:11:26 PDT 2025
zygoloid wrote:
I don't think this concern is specific to system headers.
I don't think we have precedent for disabling a warning in a SFINAE context. We do suppress warnings produced while substituting into a function template specialization during deduction if we end up not selecting that overload, but I don't think we have something analogous for concepts, and it's not clear that that would help here, given that the warning would be produced in the case where the concept check *succeeds*.
You can check if you're in an unevaluated context with `Sema::isUnevaluatedContext`.
https://github.com/llvm/llvm-project/pull/141133
More information about the cfe-commits
mailing list