Fariborz Jahanian | 729d5c4 | 2012-02-24 00:34:58 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -E %s -o %t.mm |
| 2 | // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s |
| 3 | |
| 4 | void *sel_registerName(const char *); |
| 5 | |
| 6 | @interface NSMutableArray |
| 7 | - (void)addObject:(id)addObject; |
| 8 | @end |
| 9 | |
| 10 | @interface NSInvocation { |
| 11 | @private |
| 12 | id _container; |
| 13 | } |
| 14 | + (NSInvocation *)invocationWithMethodSignature; |
| 15 | |
| 16 | @end |
| 17 | |
| 18 | @implementation NSInvocation |
| 19 | |
| 20 | + (NSInvocation *)invocationWithMethodSignature { |
| 21 | NSInvocation *newInv; |
| 22 | id obj = newInv->_container; |
| 23 | [newInv->_container addObject:0]; |
| 24 | return 0; |
| 25 | } |
| 26 | @end |
| 27 | |
Fariborz Jahanian | 7cb2a1b | 2012-03-20 17:13:39 +0000 | [diff] [blame] | 28 | // CHECK: id obj = (*(id *)((char *)newInv + OBJC_IVAR_$_NSInvocation$_container)); |
Fariborz Jahanian | fd4ce2c | 2012-03-20 17:34:50 +0000 | [diff] [blame] | 29 | // rdar://11076938 |
| 30 | // CHECK: struct _class_t *superclass; |
Fariborz Jahanian | 3f162c3 | 2012-03-27 16:21:30 +0000 | [diff] [blame] | 31 | // CHECK: extern "C" __declspec(dllimport) struct objc_cache _objc_empty_cache; |