48 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3@interface INTF1 @end4 5@protocol p1,p2,p3; // expected-note {{protocol 'p2' has no definition}} \6 // expected-note {{protocol 'p3' has no definition}}7 8@protocol p1;9 10@protocol PROTO111- (INTF1<p1>*) meth;12@end13 14@protocol p1 @end15 16@interface I1 <p1> @end17 18@interface E1 <p2> @end // expected-warning {{cannot find protocol definition for 'p2'}}19 20@protocol p2 @end21 22 23@interface I2 <p1,p2> @end24 25@interface E2 <p1,p2,p3> @end // expected-warning {{cannot find protocol definition for 'p3'}}26 27@class U1, U2; // expected-note {{forward declaration of class here}}28 29@interface E3 : U1 @end // expected-error {{attempting to use the forward class 'U1' as superclass of 'E3'}}30 31 32@interface I3 : E3 @end33 34@interface U2 @end35 36@interface I4 : U2 <p1,p2>37@end38 39@interface NSObject @end40 41@protocol UndefinedParentProtocol; // expected-note {{protocol 'UndefinedParentProtocol' has no definition}}42 43@protocol UndefinedProtocol <UndefinedParentProtocol>44@end45 46@interface SomeObject : NSObject <UndefinedProtocol> // expected-warning {{cannot find protocol definition for 'UndefinedProtocol'}}47@end48