blob: 7cab982e6e21dd1d4b523caacffecfd9374e50c4 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -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