================ @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -std=c2x -verify %s + +/* WG14 N3006: Full + * Underspecified object declarations + */ + +struct S1 { int x, y; }; // expected-note {{previous definition is here}} +union U1 { int a; double b; }; // expected-note {{previous definition is here}} +enum E1 { FOO, BAR }; // expected-note {{previous definition is here}} + +auto normal_struct = (struct S1){ 1, 2 }; ---------------- nickdesaulniers wrote:
consider adding a test using compound literals ```c auto normal_struct2 = (struct S1) { .x = 1, .y = 2 }; ``` (I'm surprised we don't currently support this (`normal_struct2` or `normal_struct`). That alone seems like an improvement. https://github.com/llvm/llvm-project/pull/79845 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits