brintos

brintos / llvm-project-archived public Read only

0
0
Text · 910 B · d433fe4 Raw
29 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"SEL=void*" -U__declspec -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 -Werror -Wno-address-of-temporary -D"SEL=void*" -U__declspec  -D"__declspec(X)=" %t-modern-rw.cpp5 6typedef unsigned long size_t;7 8void f(void (^block)(void));9 10@interface X {11        int y;12}13- (void)foo;14@end15 16@implementation X17- (void)foo {18        __block int kerfluffle;19        __block int x;20        f(^{21                f(^{22                                y = 42;23                            kerfluffle = 1;24			    x = 2;25                });26        });27}28@end29