Files
clang-p2996/clang/test/PCH/blocks.h
Douglas Gregor c95701da6c PCH support for blocks
llvm-svn: 69373
2009-04-17 19:21:43 +00:00

15 lines
333 B
C

// Header for PCH test blocks.c
int call_block(int (^bl)(int x, int y), int a, int b) {
return bl(a, b);
}
int add(int a, int b) {
return call_block(^(int x, int y) { return x + y; }, a, b);
}
int scaled_add(int a, int b, int s) {
__block int scale = s;
return call_block(^(int x, int y) { return x*scale + y; }, a, b);
}