Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Fariborz Jahanian | 4b6df3f | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 2 | |
Fariborz Jahanian | b27c156 | 2007-09-22 00:01:35 +0000 | [diff] [blame] | 3 | @interface INTF1 @end |
| 4 | |
| 5 | @protocol p1,p2,p3; |
| 6 | |
| 7 | @protocol p1; |
| 8 | |
| 9 | @protocol PROTO1 |
| 10 | - (INTF1<p1>*) meth; |
| 11 | @end |
| 12 | |
| 13 | @protocol p1 @end |
| 14 | |
| 15 | @interface I1 <p1> @end |
| 16 | |
Chris Lattner | eacc392 | 2008-07-26 03:47:43 +0000 | [diff] [blame] | 17 | @interface E1 <p2> @end // expected-warning {{cannot find protocol definition for 'p2'}} |
Fariborz Jahanian | b27c156 | 2007-09-22 00:01:35 +0000 | [diff] [blame] | 18 | |
| 19 | @protocol p2 @end |
| 20 | |
| 21 | |
| 22 | @interface I2 <p1,p2> @end |
| 23 | |
Chris Lattner | eacc392 | 2008-07-26 03:47:43 +0000 | [diff] [blame] | 24 | @interface E2 <p1,p2,p3> @end // expected-warning {{cannot find protocol definition for 'p3'}} |
Fariborz Jahanian | b27c156 | 2007-09-22 00:01:35 +0000 | [diff] [blame] | 25 | |
| 26 | @class U1, U2; |
| 27 | |
| 28 | @interface E3 : U1 @end // expected-error {{cannot find interface declaration for 'U1', superclass of 'E3'}} |
| 29 | |
| 30 | |
| 31 | @interface I3 : E3 @end |
| 32 | |
| 33 | @interface U2 @end |
| 34 | |
| 35 | @interface I4 : U2 <p1,p2> |
| 36 | @end |