[clang] [Clang] Add [[clang::complete_on_member_instantiation]] (PR #211231)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 22 04:09:30 PDT 2026


philnik777 wrote:

For some context: We've recently broken some code by accident because we changed `vector::empty()` to require complete types. The C++ standard generally requires the value type to be complete before calling any member function of any of the containers. The idea is that that we can easily enforce this requirement with this attribute and also happen to significantly improve the diagnostic if people still try to instantiate members with an incomplete type.

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


More information about the cfe-commits mailing list