brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 27eb054 Raw
50 lines · plain
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.cpp2// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp3// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp4// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp5 6typedef unsigned long size_t;7void *sel_registerName(const char *);8 9void f(void (^block)(void));10void f2(id);11void f3(int);12char f4(id, id);13 14@interface Baz15- (void)b:(void (^)(void))block;16@end17 18@interface Bar19@end20 21@interface Foo {22	int _x;23}24@end25 26@implementation Foo27- (void)method:(Bar *)up {28    Baz *down;29	int at;30    id cq;31    __block char didit = 'a';32    __block char upIsFinished = 'b';33    f(^{34            id old_cq;35			f2(cq);36            [down b:^{37                    [down b:^{38                            f(^{39                                    didit = f4(up, down);40									upIsFinished = 'c';41                                    self->_x++;42                                });43                        }];44                }];45				f2(old_cq);46			f3(at);47    });48}49@end50