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
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
28// CHECK: id obj = (*(id *)((char *)newInv + OBJC_IVAR_$_NSInvocation$_container));
29// rdar://11076938
30// CHECK: struct _class_t *superclass;
31// CHECK: extern "C" __declspec(dllimport) struct objc_cache _objc_empty_cache;
32