[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81042)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 7 20:03:05 PST 2024


================
@@ -224,6 +224,9 @@ struct TemplateInit {
   };
   // FIXME: This is ill-formed (no diagnostic required). We should diagnose it.
   constexpr TemplateInit() {} // desired-error {{must initialize all members}}
+#ifndef CXX2A
----------------
shafik wrote:

We normally do this using parameters to `-verify` and using those in the expected line e.g. 

https://github.com/llvm/llvm-project/blob/main/clang/test/Parser/cxx2b-lambdas-ext-warns.cpp

CC @AaronBallman 

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


More information about the cfe-commits mailing list