================
@@ -71,6 +71,12 @@ namespace test_misplacement {
[[]] union union_attr2; //expected-error{{misplaced attributes}}
[[]] enum E2 { }; //expected-error{{misplaced attributes}}
}
+struct S1 { __attribute__((deprecated)) alignas(16) int x; }; // expected-none
+class C1 { __attribute__((deprecated)) alignas(16) int x; }; // expected-none
----------------
DenisGZM wrote:
Thanks for the tests. Also added these for C23 testing, but there are some
differences:
In C23 alignas is sticked to type (and I think __attribute__ is sticked to type
too), so there are less valid combinations.
For invalid cases we've only got `an attribute list cannot appear here`
https://github.com/llvm/llvm-project/pull/133107
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits