blob: 83cd4209675c586b3166cae910a00204471e8b0e [file] [log] [blame]
Douglas Gregor72de6672009-01-08 20:45:30 +00001// RUN: clang -fsyntax-only -verify %s
2struct X { // expected-note{{previous definition is here}}
3 struct X { } x; // expected-error{{nested redefinition of 'X'}}
4};
5
6struct Y { };
7void f(void) {
8 struct Y { }; // okay: this is a different Y
9}
10
11struct T;
12struct Z {
13 struct T { int x; } t;
14 struct U { int x; } u;
15};
16
17void f2(void) {
18 struct T t;
19 // FIXME: this is well-formed, but Clang breaks on it struct U u;
20}
21
22