Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
Fariborz Jahanian | 9bae5e7 | 2009-01-17 21:57:49 +0000 | [diff] [blame] | 2 | |
| 3 | @interface foo |
| 4 | @end |
| 5 | |
| 6 | @implementation foo |
| 7 | @end |
| 8 | |
| 9 | @interface bar |
Steve Naroff | ccef371 | 2009-02-20 22:59:16 +0000 | [diff] [blame] | 10 | -(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 Jahanian | 9bae5e7 | 2009-01-17 21:57:49 +0000 | [diff] [blame] | 12 | @end |
| 13 | |
| 14 | @implementation bar |
Steve Naroff | ccef371 | 2009-02-20 22:59:16 +0000 | [diff] [blame] | 15 | -(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 Jahanian | 9bae5e7 | 2009-01-17 21:57:49 +0000 | [diff] [blame] | 19 | { |
| 20 | } |
| 21 | @end |
| 22 | |