55 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// RUN: %clang_cc1 -triple i686-pc-windows -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp4// RUN: %clang_cc1 -triple i686-pc-windows -fsyntax-only -fms-extensions -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp5 6typedef unsigned long size_t;7void *sel_registerName(const char *);8 9extern "C" void nowarn(id);10 11extern "C" void noblockwarn(void (^)());12 13@interface INTFOFPROP 14@property (readwrite, retain) INTFOFPROP *outer;15@property (readwrite, retain) id inner;16@end17 18@interface NSSet19- (NSSet *)objectsPassingTest:(char (^)(id obj, char *stop))predicate ;20@end21 22@interface INTF23- (NSSet *)Meth;24@end25 26@implementation INTF27 28- (NSSet *)Meth29{30 NSSet *aces;31 32 noblockwarn(^() {33 INTFOFPROP *ace;34 nowarn(ace.outer.inner);35 noblockwarn(^() {36 INTFOFPROP *ace;37 nowarn(ace.outer.inner);38 });39 });40 41 noblockwarn(^() {42 INTFOFPROP *ace;43 nowarn(ace.outer.inner);44 });45 46return [aces objectsPassingTest:^(id obj, char *stop)47 {48 INTFOFPROP *ace = (INTFOFPROP *)obj;49 nowarn(ace.outer.inner);50 return (char)0;51 }];52 53}54@end55