blob: 582f5f4c0d7c76f13c5b402a68c46a64e178f0eb [file] [log] [blame]
Fariborz Jahanian72952fc2010-03-01 23:36:21 +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"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3// radar 7696893
4
5void *sel_registerName(const char *);
6
7void f(void (^block)(void));
8void f2(id);
9void f3(int);
10char f4(id, id);
11
12@interface Baz
13- (void)b:(void (^)(void))block;
14@end
15
16@interface Bar
17@end
18
19@interface Foo {
20 int _x;
21}
22@end
23
24@implementation Foo
25- (void)method:(Bar *)up {
26 Baz *down;
27 int at;
28 id cq;
29 __block char didit = 'a';
30 __block char upIsFinished = 'b';
31 f(^{
32 id old_cq;
33 f2(cq);
34 [down b:^{
35 [down b:^{
36 f(^{
37 didit = f4(up, down);
38 upIsFinished = 'c';
39 self->_x++;
40 });
41 }];
42 }];
43 f2(old_cq);
44 f3(at);
45 });
46}
47@end