Fariborz Jahanian | df407c3 | 2012-04-25 20:48:00 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp |
NAKAMURA Takumi | 9ff009f | 2012-05-01 10:52:06 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -U__declspec -D"__declspec(X)=" %t-modern-rw.cpp |
Fariborz Jahanian | df407c3 | 2012-04-25 20:48:00 +0000 | [diff] [blame] | 3 | // rdar:// 8243071 |
Fariborz Jahanian | df407c3 | 2012-04-25 20:48:00 +0000 | [diff] [blame] | 4 | |
Fariborz Jahanian | 8b08adb | 2012-05-03 21:44:12 +0000 | [diff] [blame] | 5 | // rdar://11375908 |
| 6 | typedef unsigned long size_t; |
| 7 | |
Fariborz Jahanian | df407c3 | 2012-04-25 20:48:00 +0000 | [diff] [blame] | 8 | void x(int y) {} |
| 9 | void f() { |
| 10 | const int bar = 3; |
| 11 | int baz = 4; |
| 12 | __block int bab = 4; |
| 13 | __block const int bas = 5; |
| 14 | void (^b)() = ^{ |
| 15 | x(bar); |
| 16 | x(baz); |
| 17 | x(bab); |
| 18 | x(bas); |
| 19 | b(); |
| 20 | }; |
| 21 | b(); |
| 22 | } |