xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/dist-object-modifiers.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
2*f4a2713aSLionel Sambuc// rdar://7076235
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc@protocol P
5*f4a2713aSLionel Sambuc- (bycopy id)serverPID; // expected-note {{previous declaration is here}}
6*f4a2713aSLionel Sambuc- (void)doStuff:(bycopy id)clientId; // expected-note {{previous declaration is here}}
7*f4a2713aSLionel Sambuc- (bycopy id)Ok;
8*f4a2713aSLionel Sambuc+ (oneway id) stillMore : (byref id)Arg : (bycopy oneway id)Arg1;  // expected-note 3 {{previous declaration is here}}
9*f4a2713aSLionel Sambuc@end
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambuc@interface I <P>
12*f4a2713aSLionel Sambuc- (id)Ok;
13*f4a2713aSLionel Sambuc@end
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambuc@implementation I
16*f4a2713aSLionel Sambuc- (id)serverPID { return 0; } // expected-warning {{conflicting distributed object modifiers on return type in implementation of 'serverPID'}}
17*f4a2713aSLionel Sambuc- (void)doStuff:(id)clientId { } // expected-warning {{conflicting distributed object modifiers on parameter type in implementation of 'doStuff:'}}
18*f4a2713aSLionel Sambuc- (bycopy id)Ok { return 0; }
19*f4a2713aSLionel Sambuc+ (id) stillMore : (id)Arg  : (bycopy id)Arg1 { return Arg; } // expected-warning {{conflicting distributed object modifiers on return type in implementation of 'stillMore::'}} \
20*f4a2713aSLionel Sambuc                                                              // expected-warning 2{{conflicting distributed object modifiers on parameter type in implementation of 'stillMore::'}}
21*f4a2713aSLionel Sambuc@end
22