[clang] Include [[clang::require_explicit_initialization]] warnings in system headers (PR #141133)
via cfe-commits
cfe-commits at lists.llvm.org
Sat May 24 06:50:18 PDT 2025
higher-performance wrote:
@cor3ntin feel free to chat, but in this case we do actually want to warn (and error, under -Werror) if _anybody_ (mis)uses `std::construct_at` (i.e. neglects to explicitly initialize a field that declares itself as such). It's the exact analog of using std::invoke to call a function that has a mandatory positional parameter -- it doesn't make sense to allow anyone to bypass it. The entire goal is to make sure that field/parameter has an explicitly provided value in all cases. So I think this really is the right fix for this particular warning, regardless of the more general problem.
https://github.com/llvm/llvm-project/pull/141133
More information about the cfe-commits
mailing list