repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git]
/
clang
/
test
/
SemaCXX
/
non-empty-class-size-zero.cpp
blob
6b714dbe038f5decb80e26f4c71c8e8c51ee1888
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!