Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
Fariborz Jahanian | 4b6df3f | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 2 | |
Fariborz Jahanian | bd51b87 | 2007-09-20 20:26:44 +0000 | [diff] [blame] | 3 | @class FOO, BAR; |
| 4 | @class FOO, BAR; |
| 5 | |
| 6 | @interface INTF : FOO // expected-error {{cannot find interface declaration for 'FOO', superclass of 'INTF'}} |
| 7 | @end |
| 8 | |
| 9 | @interface FOO |
| 10 | - (BAR*) Meth1; |
| 11 | - (FOO*) Meth2; |
| 12 | @end |
| 13 | |
| 14 | @interface INTF1 : FOO |
| 15 | @end |
| 16 | |
Chris Lattner | b8b96af | 2008-11-23 22:46:27 +0000 | [diff] [blame] | 17 | @interface INTF2 : INTF1 // expected-note {{previous definition is here}} |
Fariborz Jahanian | bd51b87 | 2007-09-20 20:26:44 +0000 | [diff] [blame] | 18 | @end |
| 19 | |
| 20 | |
| 21 | @class INTF1, INTF2; |
| 22 | |
Chris Lattner | b8b96af | 2008-11-23 22:46:27 +0000 | [diff] [blame] | 23 | @interface INTF2 : INTF1 // expected-error {{duplicate interface definition for class 'INTF2'}} |
Fariborz Jahanian | bd51b87 | 2007-09-20 20:26:44 +0000 | [diff] [blame] | 24 | @end |