xref: /aosp_15_r20/external/clang/test/SemaCXX/non-empty-class-size-zero.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only %s
2 // rdar://8945175
3 
4 struct X {
5   int array[0];
6   int array1[0];
7   int array2[0];
8   X();
9   ~X();
10 };
11 
12 struct Y {
13   int first;
14   X padding;
15   int second;
16 };
17 
18 int zero_size_array[(sizeof(Y)  == 8) -1]; // no error here!
19