1 // RUN: %clang_cc1 -rewrite-objc %s -fblocks -o -
3 void I( void (^)(void));
7 int printf(const char*, ...);
9 typedef void (^T
) (void);
12 int takeintint(int (^C
)(int)) { return C(4); }
20 noop
= ^{printf("\nClosure\n"); };
24 return ^{printf("\nClosure\n"); };
29 takeblock(^{ printf("%d\n", x
); });
40 void (^test3())(void) {
45 void (^noop
)(void) = ^{};
49 void myfunc(int (^block
)(int)) {}
51 void myfunc3(const int *x
);
64 void test_arguments() {
73 static int global_x
= 10;
74 void (^global_block
)(void) = ^{ printf("global x is %d\n", global_x
); };
76 typedef void (^void_block_t
)(void);
78 static const void_block_t myBlock
= ^{ };
80 static const void_block_t myBlock2
= ^ void(void) { };