blob: 02c40aab65995e3c7807ca0424261ee63b3144f1 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00002
Fariborz Jahanianb27c1562007-09-22 00:01:35 +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
13@protocol p1 @end
14
15@interface I1 <p1> @end
16
Chris Lattnereacc3922008-07-26 03:47:43 +000017@interface E1 <p2> @end // expected-warning {{cannot find protocol definition for 'p2'}}
Fariborz Jahanianb27c1562007-09-22 00:01:35 +000018
19@protocol p2 @end
20
21
22@interface I2 <p1,p2> @end
23
Chris Lattnereacc3922008-07-26 03:47:43 +000024@interface E2 <p1,p2,p3> @end // expected-warning {{cannot find protocol definition for 'p3'}}
Fariborz Jahanianb27c1562007-09-22 00:01:35 +000025
Douglas Gregorb3029962011-11-14 22:10:01 +000026@class U1, U2; // expected-note {{forward declaration of class here}}
Fariborz Jahanianb27c1562007-09-22 00:01:35 +000027
Fariborz Jahaniana8139732011-06-23 23:16:19 +000028@interface E3 : U1 @end // expected-error {{attempting to use the forward class 'U1' as superclass of 'E3'}}
Fariborz Jahanianb27c1562007-09-22 00:01:35 +000029
30
31@interface I3 : E3 @end
32
33@interface U2 @end
34
35@interface I4 : U2 <p1,p2>
36@end