1 // RUN: %clang_cc1 -fsyntax-only -verify %s
5 @protocol fproto; // expected-note {{'fproto' declared here}}
14 Protocol *proto = @protocol(p1);
15 Protocol *fproto = @protocol(fproto); // expected-error {{@protocol is using a forward protocol declaration of 'fproto'}}
16 Protocol *pp = @protocol(i); // expected-error {{cannot find protocol declaration for 'i'}}
17 Protocol *p1p = @protocol(cl); // expected-error {{cannot find protocol declaration for 'cl'}}
21 @protocol SuperProtocol; // expected-note {{'SuperProtocol' declared here}}
22 @protocol TestProtocol; // expected-note {{'TestProtocol' declared here}}
25 - (int) conformsToProtocol : (Protocol *)protocl;
28 int doesConform(id foo) {
29 return [foo conformsToProtocol:@protocol(TestProtocol)]; // expected-error {{@protocol is using a forward protocol declaration of 'TestProtocol'}}
32 int doesConformSuper(id foo) {
33 return [foo conformsToProtocol:@protocol(SuperProtocol)]; // expected-error {{@protocol is using a forward protocol declaration of 'SuperProtocol'}}