Fariborz Jahanian | f89c427 | 2010-02-26 19:55:31 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp |
| 2 | // RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp |
| 3 | // radar 7692350 |
| 4 | |
| 5 | void f(void (^block)(void)); |
| 6 | |
| 7 | @interface X { |
| 8 | int y; |
| 9 | } |
| 10 | - (void)foo; |
| 11 | @end |
| 12 | |
| 13 | @implementation X |
| 14 | - (void)foo { |
| 15 | __block int kerfluffle; |
Fariborz Jahanian | d64a4f4 | 2010-02-26 22:49:11 +0000 | [diff] [blame] | 16 | // radar 7692183 |
| 17 | __block x; |
Fariborz Jahanian | f89c427 | 2010-02-26 19:55:31 +0000 | [diff] [blame] | 18 | f(^{ |
| 19 | f(^{ |
| 20 | y = 42; |
| 21 | kerfluffle = 1; |
Fariborz Jahanian | d64a4f4 | 2010-02-26 22:49:11 +0000 | [diff] [blame] | 22 | x = 2; |
Fariborz Jahanian | f89c427 | 2010-02-26 19:55:31 +0000 | [diff] [blame] | 23 | }); |
| 24 | }); |
| 25 | } |
| 26 | @end |