[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / empty2.c
blob68da5a8ee8ac7fd5c0039cd33ccb5b7dee02f206
1 // RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic
3 struct emp_1 { // expected-warning {{empty struct is a GNU extension}}
4 };
6 union emp_2 { // expected-warning {{empty union is a GNU extension}}
7 };
9 struct emp_3 { // expected-warning {{struct without named members is a GNU extension}}
10 int : 0;
13 union emp_4 { // expected-warning {{union without named members is a GNU extension}}
14 int : 0;
17 struct emp_5 { // expected-warning {{struct without named members is a GNU extension}}
18 int : 0;
19 int : 0;
22 union emp_6 { // expected-warning {{union without named members is a GNU extension}}
23 int : 0;
24 int : 0;
27 struct nonamed_1 { // expected-warning {{struct without named members is a GNU extension}}
28 int : 4;
31 union nonamed_2 { // expected-warning {{union without named members is a GNU extension}}
32 int : 4;
35 struct nonamed_3 { // expected-warning {{struct without named members is a GNU extension}}
36 int : 4;
37 unsigned int : 4;
40 union nonamed_4 { // expected-warning {{union without named members is a GNU extension}}
41 int : 4;
42 unsigned int : 4;