Fariborz Jahanian | 4b6df3f | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
Fariborz Jahanian | 894c57f | 2007-09-21 15:40:54 +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 | |
Chris Lattner | eacc392 | 2008-07-26 03:47:43 +0000 | [diff] [blame] | 13 | @protocol PROTO2<p1> // expected-warning {{cannot find protocol definition for 'p1'}} |
Fariborz Jahanian | 894c57f | 2007-09-21 15:40:54 +0000 | [diff] [blame] | 14 | @end |
| 15 | |
| 16 | @protocol p1 @end |
| 17 | |
| 18 | @protocol PROTO<p1> |
| 19 | @end |
| 20 | |
| 21 | @protocol PROTO<p1> // expected-error {{duplicate protocol declaration of 'PROTO'}} |
| 22 | @end |
| 23 | |
| 24 | @protocol PROTO3<p1, p1> |
| 25 | @end |
| 26 | |
| 27 | @protocol p2 <p1> |
| 28 | @end |
| 29 | |
Chris Lattner | eacc392 | 2008-07-26 03:47:43 +0000 | [diff] [blame] | 30 | @protocol PROTO4 <p1, p2, PROTO, PROTO3, p3> // expected-warning {{cannot find protocol definition for 'p3'}} |
Fariborz Jahanian | 894c57f | 2007-09-21 15:40:54 +0000 | [diff] [blame] | 31 | @end |