================
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -std=c17 -fsyntax-only -Wuninitialized-explicit-init
-verify %s
+// RUN: %clang_cc1 -std=c23 -fsyntax-only -Wuninitialized-explicit-init
-verify %s
+
+struct ops {
+ int (*show)(void) __attribute__((require_explicit_initialization)); //
#SHOW
+ int flags;
+};
+
+struct plain {
+ int a;
+};
+
+struct plain no_attribute; // no warning: no field requires explicit
initialization
+
+struct ops never_completed; // expected-warning {{field in 'ops' requires
explicit initialization but is not explicitly initialized}} expected-note@#SHOW
{{'show' declared here}}
----------------
PathriVidyaPraveen wrote:
Done, thanks!
https://github.com/llvm/llvm-project/pull/234210
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits