1 | // RUN: %clang_cc1 -fsyntax-only -Wno-protocol -verify -Wno-objc-root-class %s |
2 | // rdar: // 7056600 |
3 | |
4 | @protocol P |
5 | - PMeth; |
6 | @end |
7 | |
8 | // Test1 |
9 | @interface I <P> @end |
10 | @implementation I @end // no warning with -Wno-protocol |
11 | |
12 | // Test2 |
13 | @interface C -PMeth; @end |
14 | @interface C (Category) <P> @end |
15 | @implementation C (Category) @end // no warning with -Wno-protocol |
16 | |
17 | // Test2 |
18 | @interface super - PMeth; @end |
19 | @interface J : super <P> |
20 | - PMeth; // expected-note {{method 'PMeth' declared here}} |
21 | @end |
22 | @implementation J @end // expected-warning {{method definition for 'PMeth' not found}} |
23 | |
24 | // Test3 |
25 | @interface K : super <P> |
26 | @end |
27 | @implementation K @end // no warning with -Wno-protocol |
28 | |
29 | // Test4 |
30 | @interface Root @end |
31 | @interface L : Root<P> @end |
32 | @implementation L @end // no warning with -Wno-protocol |
33 | |