Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Fariborz Jahanian | 3281eff | 2008-12-16 01:08:35 +0000 | [diff] [blame] | 2 | |
| 3 | @interface B1 { |
| 4 | @public |
Douglas Gregor | 72de667 | 2009-01-08 20:45:30 +0000 | [diff] [blame] | 5 | double fill_B; // expected-note {{previous declaration is here}} |
Daniel Dunbar | ad04e67 | 2009-05-03 01:08:28 +0000 | [diff] [blame] | 6 | unsigned : 0; |
Fariborz Jahanian | 3281eff | 2008-12-16 01:08:35 +0000 | [diff] [blame] | 7 | } |
| 8 | @end |
| 9 | |
| 10 | @interface B : B1 { |
| 11 | @public |
Douglas Gregor | 72de667 | 2009-01-08 20:45:30 +0000 | [diff] [blame] | 12 | int one; // expected-note {{previous declaration is here}} |
Fariborz Jahanian | 3281eff | 2008-12-16 01:08:35 +0000 | [diff] [blame] | 13 | int one; // expected-error {{duplicate member 'one'}} |
Daniel Dunbar | ad04e67 | 2009-05-03 01:08:28 +0000 | [diff] [blame] | 14 | unsigned : 0; |
Fariborz Jahanian | 3281eff | 2008-12-16 01:08:35 +0000 | [diff] [blame] | 15 | } |
| 16 | @end |
| 17 | |
| 18 | @interface A : B { |
| 19 | @public |
| 20 | int fill_B; // expected-error {{duplicate member 'fill_B'}} |
| 21 | } |
| 22 | @end |