blob: 260c215c2154a4f9c82ba491c69ab2601a360f19 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Fariborz Jahanian3281eff2008-12-16 01:08:35 +00002
3@interface B1 {
4@public
Douglas Gregor72de6672009-01-08 20:45:30 +00005 double fill_B; // expected-note {{previous declaration is here}}
Daniel Dunbarad04e672009-05-03 01:08:28 +00006 unsigned : 0;
Fariborz Jahanian3281eff2008-12-16 01:08:35 +00007}
8@end
9
10@interface B : B1 {
11@public
Douglas Gregor72de6672009-01-08 20:45:30 +000012 int one; // expected-note {{previous declaration is here}}
Fariborz Jahanian3281eff2008-12-16 01:08:35 +000013 int one; // expected-error {{duplicate member 'one'}}
Daniel Dunbarad04e672009-05-03 01:08:28 +000014 unsigned : 0;
Fariborz Jahanian3281eff2008-12-16 01:08:35 +000015}
16@end
17
18@interface A : B {
19@public
20 int fill_B; // expected-error {{duplicate member 'fill_B'}}
21}
22@end