blob: a8f5b140eaac942b989f8ac395f8b4f9f8cce20f [file] [log] [blame]
Fariborz Jahanianf89c4272010-02-26 19:55:31 +00001// 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
5void 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 Jahaniand64a4f42010-02-26 22:49:11 +000016 // radar 7692183
17 __block x;
Fariborz Jahanianf89c4272010-02-26 19:55:31 +000018 f(^{
19 f(^{
20 y = 42;
21 kerfluffle = 1;
Fariborz Jahaniand64a4f42010-02-26 22:49:11 +000022 x = 2;
Fariborz Jahanianf89c4272010-02-26 19:55:31 +000023 });
24 });
25}
26@end