blob: 255c97b280c92ef806cf72d6af2546fbaf0f2bff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
int printf(const char *, ...);
int main(int argc, char **argv) {
__block void(*bobTheFunction)(void);
__block void(^bobTheBlock)(void);
bobTheBlock = ^{;};
__block int JJJJ;
__attribute__((__blocks__(byref))) int III;
int (^XXX)(void) = ^{ return III+JJJJ; };
// rdar 7671883
__block char array[10] = {'a', 'b', 'c', 'd'};
char (^ch)() = ^{ array[1] = 'X'; return array[5]; };
ch();
return 0;
}
|