Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 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.cpp |
| 2 | // 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.cpp |
| 3 | // RUN: %clang_cc1 -triple i686-pc-windows -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp |
| 4 | // 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.cpp |
Fariborz Jahanian | da4ad9f | 2010-11-08 18:37:50 +0000 | [diff] [blame] | 5 | // radar 8608293 |
| 6 | |
Fariborz Jahanian | 8b08adb | 2012-05-03 21:44:12 +0000 | [diff] [blame] | 7 | typedef unsigned long size_t; |
Fariborz Jahanian | da4ad9f | 2010-11-08 18:37:50 +0000 | [diff] [blame] | 8 | void *sel_registerName(const char *); |
| 9 | |
| 10 | extern "C" void nowarn(id); |
| 11 | |
| 12 | extern "C" void noblockwarn(void (^)()); |
| 13 | |
| 14 | @interface INTFOFPROP |
| 15 | @property (readwrite, retain) INTFOFPROP *outer; |
| 16 | @property (readwrite, retain) id inner; |
| 17 | @end |
| 18 | |
| 19 | @interface NSSet |
| 20 | - (NSSet *)objectsPassingTest:(char (^)(id obj, char *stop))predicate ; |
| 21 | @end |
| 22 | |
| 23 | @interface INTF |
| 24 | - (NSSet *)Meth; |
| 25 | @end |
| 26 | |
| 27 | @implementation INTF |
| 28 | |
| 29 | - (NSSet *)Meth |
| 30 | { |
| 31 | NSSet *aces; |
| 32 | |
| 33 | noblockwarn(^() { |
| 34 | INTFOFPROP *ace; |
| 35 | nowarn(ace.outer.inner); |
| 36 | noblockwarn(^() { |
| 37 | INTFOFPROP *ace; |
| 38 | nowarn(ace.outer.inner); |
| 39 | }); |
| 40 | }); |
| 41 | |
| 42 | noblockwarn(^() { |
| 43 | INTFOFPROP *ace; |
| 44 | nowarn(ace.outer.inner); |
| 45 | }); |
| 46 | |
| 47 | return [aces objectsPassingTest:^(id obj, char *stop) |
| 48 | { |
| 49 | INTFOFPROP *ace = (INTFOFPROP *)obj; |
| 50 | nowarn(ace.outer.inner); |
| 51 | return (char)0; |
| 52 | }]; |
| 53 | |
| 54 | } |
| 55 | @end |