Fariborz Jahanian | 21761c8 | 2011-02-21 23:49:15 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | // rdar://7076235 |
| 3 | |
| 4 | @protocol P |
| 5 | - (bycopy id)serverPID; // expected-note {{previous declaration is here}} |
| 6 | - (void)doStuff:(bycopy id)clientId; // expected-note {{previous declaration is here}} |
Fariborz Jahanian | 730cfb1 | 2011-08-10 17:16:30 +0000 | [diff] [blame] | 7 | - (bycopy id)Ok; |
Fariborz Jahanian | 21761c8 | 2011-02-21 23:49:15 +0000 | [diff] [blame] | 8 | + (oneway id) stillMore : (byref id)Arg : (bycopy oneway id)Arg1; // expected-note 3 {{previous declaration is here}} |
| 9 | @end |
| 10 | |
| 11 | @interface I <P> |
Fariborz Jahanian | 730cfb1 | 2011-08-10 17:16:30 +0000 | [diff] [blame] | 12 | - (id)Ok; |
Fariborz Jahanian | 21761c8 | 2011-02-21 23:49:15 +0000 | [diff] [blame] | 13 | @end |
| 14 | |
| 15 | @implementation I |
| 16 | - (id)serverPID { return 0; } // expected-warning {{conflicting distributed object modifiers on return type in implementation of 'serverPID'}} |
Matt Beaumont-Gay | f565f11 | 2011-02-23 19:39:05 +0000 | [diff] [blame] | 17 | - (void)doStuff:(id)clientId { } // expected-warning {{conflicting distributed object modifiers on parameter type in implementation of 'doStuff:'}} |
Fariborz Jahanian | 21761c8 | 2011-02-21 23:49:15 +0000 | [diff] [blame] | 18 | - (bycopy id)Ok { return 0; } |
| 19 | + (id) stillMore : (id)Arg : (bycopy id)Arg1 { return Arg; } // expected-warning {{conflicting distributed object modifiers on return type in implementation of 'stillMore::'}} \ |
Matt Beaumont-Gay | 354a3c3 | 2011-02-23 19:40:41 +0000 | [diff] [blame] | 20 | // expected-warning 2{{conflicting distributed object modifiers on parameter type in implementation of 'stillMore::'}} |
Fariborz Jahanian | 21761c8 | 2011-02-21 23:49:15 +0000 | [diff] [blame] | 21 | @end |