blob: 1b32b35f33a80cc5c2ca7a0f16bfecb4f760d22e [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// 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 Jahanian43aa1c32012-04-16 22:14:01 +00002// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D__block="" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
Fariborz Jahanian20432ef2010-07-28 23:27:30 +00003// rdar:// 8243071
4
5void x(int y) {}
6void f() {
7 const int bar = 3;
8 int baz = 4;
9 __block int bab = 4;
10 __block const int bas = 5;
11 void (^b)() = ^{
12 x(bar);
13 x(baz);
14 x(bab);
15 x(bas);
16 b();
17 };
18 b();
19}