blob: 23fc675a4e9297a846c4cdb4be0209e2a89fdd8e [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Fariborz Jahanian9bae5e72009-01-17 21:57:49 +00002
3@interface foo
4@end
5
6@implementation foo
7@end
8
9@interface bar
Steve Naroffccef3712009-02-20 22:59:16 +000010-(void) my_method:(foo) my_param; // expected-error {{Objective-C type cannot be passed by value}}
11- (foo)cccccc:(long)ddddd; // expected-error {{Objective-C type cannot be returned by value}}
Fariborz Jahanian9bae5e72009-01-17 21:57:49 +000012@end
13
14@implementation bar
Steve Naroffccef3712009-02-20 22:59:16 +000015-(void) my_method:(foo) my_param // expected-error {{Objective-C type cannot be passed by value}}
16{
17}
18- (foo)cccccc:(long)ddddd // expected-error {{Objective-C type cannot be returned by value}}
Fariborz Jahanian9bae5e72009-01-17 21:57:49 +000019{
20}
21@end
22