[clang] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)

via cfe-commits cfe-commits at lists.llvm.org
Fri May 23 00:46:42 PDT 2025


higher-performance wrote:

@efriedma-quic: I'm not sure what the appropriate way to test this is. The file [clang/test/SemaCXX/uninitialized.cpp](https://github.com/llvm/llvm-project/blob/main/clang/test/SemaCXX/uninitialized.cpp) doesn't include any system headers. Should I just add a system header there and include it?

Re: libc++ cooperation: I thought about something along those lines too, but I couldn't think of a satisfactory solution. Especially because people can have their own templated wrappers too, and also because "system headers" could be anything third-party -- not just the standard library. I think the current approach might actually be best, as inelegant as it feels.

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


More information about the cfe-commits mailing list