Argiris Kirtzidis | 73b524d | 2008-06-12 12:40:02 +0000 | [diff] [blame] | 1 | // RUN: clang -rewrite-objc %s -o - && |
Steve Naroff | 44e8122 | 2008-04-14 22:03:09 +0000 | [diff] [blame] | 2 | // RUN: clang -rewrite-objc %s -o - | grep 'newInv->_container' |
Fariborz Jahanian | c884988 | 2008-01-23 20:34:40 +0000 | [diff] [blame] | 3 | |
| 4 | @interface NSMutableArray |
| 5 | - (void)addObject:(id)addObject; |
| 6 | @end |
| 7 | |
| 8 | @interface NSInvocation { |
| 9 | @private |
| 10 | id _container; |
| 11 | } |
| 12 | + (NSInvocation *)invocationWithMethodSignature; |
| 13 | |
| 14 | @end |
| 15 | |
| 16 | @implementation NSInvocation |
| 17 | |
| 18 | + (NSInvocation *)invocationWithMethodSignature { |
| 19 | NSInvocation *newInv; |
Steve Naroff | 5d93311 | 2008-03-12 23:15:19 +0000 | [diff] [blame] | 20 | id obj = newInv->_container; |
Fariborz Jahanian | c884988 | 2008-01-23 20:34:40 +0000 | [diff] [blame] | 21 | [newInv->_container addObject:0]; |
| 22 | return 0; |
| 23 | } |
| 24 | @end |