Fariborz Jahanian | 4b6df3f | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
Fariborz Jahanian | ccb4f31 | 2007-09-25 18:38:09 +0000 | [diff] [blame] | 3 | @protocol SUPER; |
| 4 | |
Chris Lattner | eacc392 | 2008-07-26 03:47:43 +0000 | [diff] [blame^] | 5 | @interface SUPER <SUPER> @end // expected-warning {{cannot find protocol definition for 'SUPER'}} |
Fariborz Jahanian | ccb4f31 | 2007-09-25 18:38:09 +0000 | [diff] [blame] | 6 | |
Fariborz Jahanian | 4b6df3f | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 7 | typedef int INTF; // expected-error {{previous definition is here}} |
Fariborz Jahanian | ccb4f31 | 2007-09-25 18:38:09 +0000 | [diff] [blame] | 8 | |
| 9 | @interface INTF @end // expected-error {{redefinition of 'INTF' as different kind of symbol}} |
| 10 | |
Fariborz Jahanian | be127ba | 2007-10-15 19:16:57 +0000 | [diff] [blame] | 11 | @interface OBJECT @end // expected-error {{previous definition is here}} |
Fariborz Jahanian | ccb4f31 | 2007-09-25 18:38:09 +0000 | [diff] [blame] | 12 | |
| 13 | @interface INTF1 : OBJECT @end |
| 14 | |
Bill Wendling | f5f20bd | 2007-11-26 08:26:20 +0000 | [diff] [blame] | 15 | @interface INTF1 : OBJECT @end // expected-error {{duplicate interface declaration for class 'INTF1'}} |
Fariborz Jahanian | ccb4f31 | 2007-09-25 18:38:09 +0000 | [diff] [blame] | 16 | |
Fariborz Jahanian | be127ba | 2007-10-15 19:16:57 +0000 | [diff] [blame] | 17 | typedef int OBJECT; // expected-error {{previous definition is here}} \ |
| 18 | expected-error {{redefinition of 'OBJECT' as different kind of symbol}} |
Fariborz Jahanian | ccb4f31 | 2007-09-25 18:38:09 +0000 | [diff] [blame] | 19 | |
| 20 | @interface INTF2 : OBJECT @end // expected-error {{redefinition of 'OBJECT' as different kind of symbol}} |
| 21 | |
| 22 | |
| 23 | @protocol PROTO; |
| 24 | |
| 25 | @interface INTF3 : PROTO @end // expected-error {{cannot find interface declaration for 'PROTO', superclass of 'INTF3'}} |
| 26 | |