Patrick Beard | acfbe9e | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
Fariborz Jahanian | c9cd8a1 | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 2 | |
Fariborz Jahanian | b75db4c | 2007-09-28 17:40:07 +0000 | [diff] [blame] | 3 | @protocol P1 |
Ted Kremenek | 59b10db | 2012-02-27 22:55:11 +0000 | [diff] [blame] | 4 | - (void) P1proto; // expected-note {{method 'P1proto' declared here}} |
| 5 | + (void) ClsP1Proto; // expected-note {{method 'ClsP1Proto' declared here}} |
Fariborz Jahanian | b75db4c | 2007-09-28 17:40:07 +0000 | [diff] [blame] | 6 | - (void) DefP1proto; |
| 7 | @end |
| 8 | @protocol P2 |
Ted Kremenek | 59b10db | 2012-02-27 22:55:11 +0000 | [diff] [blame] | 9 | - (void) P2proto; // expected-note {{method 'P2proto' declared here}} |
| 10 | + (void) ClsP2Proto; // expected-note {{method 'ClsP2Proto' declared here}} |
Fariborz Jahanian | b75db4c | 2007-09-28 17:40:07 +0000 | [diff] [blame] | 11 | @end |
| 12 | |
| 13 | @protocol P3<P2> |
Ted Kremenek | 59b10db | 2012-02-27 22:55:11 +0000 | [diff] [blame] | 14 | - (void) P3proto; // expected-note {{method 'P3proto' declared here}} |
| 15 | + (void) ClsP3Proto; // expected-note {{method 'ClsP3Proto' declared here}} |
Fariborz Jahanian | b75db4c | 2007-09-28 17:40:07 +0000 | [diff] [blame] | 16 | + (void) DefClsP3Proto; |
| 17 | @end |
| 18 | |
| 19 | @protocol PROTO<P1, P3> |
Ted Kremenek | 59b10db | 2012-02-27 22:55:11 +0000 | [diff] [blame] | 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}} |
Fariborz Jahanian | b75db4c | 2007-09-28 17:40:07 +0000 | [diff] [blame] | 23 | @end |
| 24 | |
Ted Kremenek | 2ccf19e | 2013-12-13 05:58:51 +0000 | [diff] [blame] | 25 | @interface INTF <PROTO> |
Fariborz Jahanian | b75db4c | 2007-09-28 17:40:07 +0000 | [diff] [blame] | 26 | @end |
| 27 | |
Ted Kremenek | 2ccf19e | 2013-12-13 05:58:51 +0000 | [diff] [blame] | 28 | @implementation INTF // expected-warning 9 {{in protocol '}} |
Fariborz Jahanian | b75db4c | 2007-09-28 17:40:07 +0000 | [diff] [blame] | 29 | - (void) DefP1proto{} |
Fariborz Jahanian | b75db4c | 2007-09-28 17:40:07 +0000 | [diff] [blame] | 30 | + (void) DefClsP3Proto{} |
Fariborz Jahanian | c9cd8a1 | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 31 | @end |