| 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
| 2 | |
| 3 | @protocol P1 |
| 4 | - (void) P1proto; // expected-note {{method 'P1proto' declared here}} |
| 5 | + (void) ClsP1Proto; // expected-note {{method 'ClsP1Proto' declared here}} |
| 6 | - (void) DefP1proto; |
| 7 | @end |
| 8 | @protocol P2 |
| 9 | - (void) P2proto; // expected-note {{method 'P2proto' declared here}} |
| 10 | + (void) ClsP2Proto; // expected-note {{method 'ClsP2Proto' declared here}} |
| 11 | @end |
| 12 | |
| 13 | @protocol P3<P2> |
| 14 | - (void) P3proto; // expected-note {{method 'P3proto' declared here}} |
| 15 | + (void) ClsP3Proto; // expected-note {{method 'ClsP3Proto' declared here}} |
| 16 | + (void) DefClsP3Proto; |
| 17 | @end |
| 18 | |
| 19 | @protocol PROTO<P1, P3> |
| 20 | - (void) meth; // expected-note {{method 'meth' declared here}} |
| 21 | - (void) meth : (int) arg1; // expected-note {{method 'meth:' declared here}} |
| 22 | + (void) cls_meth : (int) arg1; // expected-note {{method 'cls_meth:' declared here}} |
| 23 | @end |
| 24 | |
| 25 | @interface INTF <PROTO> |
| 26 | @end |
| 27 | |
| 28 | @implementation INTF // expected-warning 9 {{in protocol '}} |
| 29 | - (void) DefP1proto{} |
| 30 | + (void) DefClsP3Proto{} |
| 31 | @end |
| 32 | |