Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -rewrite-objc %s -o=- |
Fariborz Jahanian | e2c4cd8 | 2007-12-04 21:48:54 +0000 | [diff] [blame] | 2 | |
| 3 | typedef struct S { |
| 4 | int * pint; |
| 5 | int size; |
| 6 | }NSRec; |
| 7 | |
| 8 | @interface SUPER |
| 9 | - (NSRec) MainMethod : (NSRec) Arg1 : (NSRec) Arg2; |
| 10 | @end |
| 11 | |
| 12 | @interface MyDerived : SUPER |
| 13 | { |
| 14 | NSRec d; |
| 15 | } |
| 16 | - (int) instanceMethod; |
| 17 | - (int) another : (int) arg; |
| 18 | - (NSRec) MainMethod : (NSRec) Arg1 : (NSRec) Arg2; |
| 19 | @end |
| 20 | |
| 21 | @implementation MyDerived |
| 22 | - (int) instanceMethod { |
| 23 | return [self another : [self MainMethod : d : d].size]; |
| 24 | } |
| 25 | |
| 26 | - (int) another : (int) arg { return arg; } |
| 27 | - (NSRec) MainMethod : (NSRec) Arg1 : (NSRec) Arg2 { return Arg2; } |
| 28 | @end |
| 29 | |