blob: f323745c5dfe3e03c9c3db6942660ae8e7ec44fa [file] [log] [blame]
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00001// RUN: clang -fsyntax-only -verify %s
2
Fariborz Jahanian894c57f2007-09-21 15:40:54 +00003@interface INTF1 @end
4
5@protocol p1,p2,p3;
6
7@protocol p1;
8
9@protocol PROTO1
10- (INTF1<p1>*) meth;
11@end
12
Steve Naroffa924e7c2007-12-11 03:34:41 +000013@protocol PROTO2<p1> // expected-warning {{cannot find protocol definition for 'p1', referenced by 'PROTO2'}}
Fariborz Jahanian894c57f2007-09-21 15:40:54 +000014@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
Steve Naroffa924e7c2007-12-11 03:34:41 +000030@protocol PROTO4 <p1, p2, PROTO, PROTO3, p3> // expected-warning {{cannot find protocol definition for 'p3', referenced by 'PROTO4'}}
Fariborz Jahanian894c57f2007-09-21 15:40:54 +000031@end