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 |
---|---|
2 | // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D__block="" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp |
3 | // rdar:// 8243071 |
4 | |
5 | void x(int y) {} |
6 | void 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 | } |
20 |