58 lines · plain
1// RUN: %clang_cc1 -triple i686-pc-windows -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp2// RUN: %clang_cc1 -triple i686-pc-windows -fsyntax-only -fms-extensions -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp3 4void *sel_registerName(const char *);5 6@interface Foo {7 int i;8 int rrrr;9 Foo *o;10}11@property int i;12@property(readonly) int rrrr;13@property int d;14@property(retain) Foo *o;15 16- (void)foo;17@end18 19@implementation Foo20@synthesize i;21@synthesize rrrr;22@synthesize o;23 24@dynamic d;25 26- (void)foo {27 i = 99;28}29 30- (int)bar {31 return i;32}33@end34 35@interface Bar {36}37@end38 39@implementation Bar40 41static int func(int i) { return 0; }42 43- (void)baz {44 Foo *obj1, *obj2;45 int i;46 if (obj1.i == obj2.rrrr)47 obj1.i = 33;48 obj1.i = func(obj2.rrrr);49 obj1.i = obj2.rrrr;50 obj1.i = (obj2.rrrr);51 [obj1 setI:[obj2 rrrr]];52 obj1.i = [obj2 rrrr];53 obj1.i = 3 + [obj2 rrrr];54 i = obj1.o.i;55 obj1.o.i = 77;56}57@end58