John McCall | 260611a | 2012-06-20 06:18:46 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp |
Fariborz Jahanian | 1f90622 | 2010-05-25 15:56:08 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o %t %t-rw.cpp |
| 3 | // radar 7987817 |
| 4 | |
| 5 | void *sel_registerName(const char *); |
| 6 | |
| 7 | @interface Test { |
| 8 | } |
| 9 | @end |
| 10 | |
| 11 | @implementation Test |
| 12 | |
| 13 | - (void)enumerateProvidersWithBlock:(void (^)(void))block { |
| 14 | block(); |
| 15 | } |
| 16 | |
| 17 | - (void)providerEnumerator { |
| 18 | ^(void (^providerBlock)(void)) { |
| 19 | [self enumerateProvidersWithBlock:providerBlock]; |
| 20 | }; |
| 21 | } |
| 22 | |
| 23 | - (void)testNilBlock { |
| 24 | [self enumerateProvidersWithBlock:0]; |
| 25 | } |
| 26 | |
| 27 | @end |
| 28 | |
| 29 | |
| 30 | |
| 31 | int main(int argc, char *argv[]) { |
| 32 | return 0; |
| 33 | } |