blob: a5c17a6dd45c7db884393aed6d97b1499c3e45a2 [file] [log] [blame]
Fariborz Jahanian729d5c42012-02-24 00:34:58 +00001// 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
4void *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 Jahanian7cb2a1b2012-03-20 17:13:39 +000028// CHECK: id obj = (*(id *)((char *)newInv + OBJC_IVAR_$_NSInvocation$_container));
Fariborz Jahanianfd4ce2c2012-03-20 17:34:50 +000029// rdar://11076938
30// CHECK: struct _class_t *superclass;
Fariborz Jahanian3f162c32012-03-27 16:21:30 +000031// CHECK: extern "C" __declspec(dllimport) struct objc_cache _objc_empty_cache;