Mercurial > hg > CbC > CbC_llvm
diff clang/test/CodeGen/blocks-1.c @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 |
parents | 1d019706d866 |
children |
line wrap: on
line diff
--- a/clang/test/CodeGen/blocks-1.c Wed Jul 21 10:27:27 2021 +0900 +++ b/clang/test/CodeGen/blocks-1.c Wed Nov 09 17:45:10 2022 +0900 @@ -18,7 +18,7 @@ int printf(const char *, ...); -void test1() { +void test1(void) { __block int a; int b=2; a=1; @@ -29,7 +29,7 @@ printf("a is %d, b is %d\n", a, b); } -void test2() { +void test2(void) { __block int a; a=1; printf("a is %d\n", a); @@ -43,13 +43,13 @@ printf("a is %d\n", a); } -void test3() { +void test3(void) { __block int k; __block int (^j)(int); ^{j=0; k=0;}(); // needs copy/dispose } -int test4() { +int test4(void) { extern int g; static int i = 1; ^(int j){ i = j; g = 0; }(0); // does not need copy/dispose @@ -58,25 +58,25 @@ int g; -void test5() { +void test5(void) { __block struct { int i; } i; ^{ (void)i; }(); // needs copy/dispose } -void test6() { +void test6(void) { __block int i; ^{ i=1; }(); // needs copy/dispose ^{}(); // does not need copy/dispose } -void test7() { +void test7(void) { ^{ // does not need copy/dispose __block int i; ^{ i = 1; }(); // needs copy/dispose }(); } -int main() { +int main(void) { int rv = 0; test1(); test2();