Skip to content

Commit 86ba0a7

Browse files
committed
Format C sources with new clang-format.
1 parent de0138a commit 86ba0a7

File tree

19 files changed

+50
-48
lines changed

19 files changed

+50
-48
lines changed

sulong/tests/com.oracle.truffle.llvm.tests.inlineasm.native/inlineasm/inlineassembly003.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2021, Oracle and/or its affiliates.
2+
* Copyright (c) 2016, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -32,7 +32,7 @@
3232
int main() {
3333
int arg1 = 0;
3434
int not = 0;
35-
__asm__("notl %%eax;" : "=a"(not ) : "a"(arg1));
35+
__asm__("notl %%eax;" : "=a"(not) : "a"(arg1));
3636

3737
if (not != -1) {
3838
abort();

sulong/tests/com.oracle.truffle.llvm.tests.inlineasm.native/inlineasm/inlineassembly005.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2021, Oracle and/or its affiliates.
2+
* Copyright (c) 2016, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -32,5 +32,5 @@ int main() {
3232
int arg2 = 9;
3333
int or = 0;
3434
__asm__("orl %%ebx, %%eax;" : "=a"(or) : "a"(arg1), "b"(arg2));
35-
return or ;
35+
return or;
3636
}

sulong/tests/com.oracle.truffle.llvm.tests.interop.native/interop/interopUndefinedToIntConv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2023, Oracle and/or its affiliates.
2+
* Copyright (c) 2020, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -38,7 +38,7 @@ struct Order {
3838
POLYGLOT_DECLARE_STRUCT(Order);
3939

4040
int main() {
41-
struct Order o = (struct Order){ .price = 100 };
41+
struct Order o = (struct Order) { .price = 100 };
4242

4343
/* The following line represents: void *foo = polyglot_eval("js", "(order) => order.price"); */
4444
void *foo = polyglot_import("getPrice");

sulong/tests/com.oracle.truffle.llvm.tests.interop.native/interop/polyglotArrayToNative.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates.
2+
* Copyright (c) 2021, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -48,7 +48,7 @@ void get_Simple_array_typeid(uint64_t len, void (*ret)(polyglot_typeid typeid))
4848
ret(polyglot_array_typeid(polyglot_VoidPtr_typeid(), len));
4949
}
5050

51-
#define WRAP(x) ((Simple){ (x) })
51+
#define WRAP(x) ((Simple) { (x) })
5252

5353
void *simple_array_to_native(VoidPtr *polyglot_array, uint64_t size) {
5454
Simple *native = (Simple *) malloc(size * sizeof(Simple));

sulong/tests/com.oracle.truffle.llvm.tests.irdebug.native/src/vectorKinds.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -45,10 +45,10 @@ template <typename T> void doReceive(T toInspect) {
4545
}
4646

4747
__attribute__((constructor)) void test() {
48-
doReceive((v9sb){ '0', '1', '2', '3', '4', '5', '6', '7', '8' });
49-
doReceive((v8ss){ 0, 1, 2, 3, 4, 5, 6, 7 });
50-
doReceive((v7si){ 0, 1, 2, 3, 4, 5, 6 });
51-
doReceive((v6sl){ 0L, 1L, 2L, 3L, 4L, 5L });
52-
doReceive((v5flt){ 0.0f, 1.1f, 2.2f, 3.3f, 4.4f });
53-
doReceive((v4dbl){ 0.0, 1.1, 2.2, 3.3 });
48+
doReceive((v9sb) { '0', '1', '2', '3', '4', '5', '6', '7', '8' });
49+
doReceive((v8ss) { 0, 1, 2, 3, 4, 5, 6, 7 });
50+
doReceive((v7si) { 0, 1, 2, 3, 4, 5, 6 });
51+
doReceive((v6sl) { 0L, 1L, 2L, 3L, 4L, 5L });
52+
doReceive((v5flt) { 0.0f, 1.1f, 2.2f, 3.3f, 4.4f });
53+
doReceive((v4dbl) { 0.0, 1.1, 2.2, 3.3 });
5454
}

sulong/tests/com.oracle.truffle.llvm.tests.sulong.native/c/truffle-c/arrayTest/compoundLiteral1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -34,6 +34,6 @@ int func() {
3434

3535
int main() {
3636
int *arr;
37-
arr = (int[]){ 1, func(), func() };
37+
arr = (int[]) { 1, func(), func() };
3838
return arr[0] + arr[1] + arr[2] + func();
3939
}

sulong/tests/com.oracle.truffle.llvm.tests.sulong.native/c/truffle-c/arrayTest/constSizeVarArray1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -30,5 +30,5 @@
3030
int main() {
3131
long n = 5;
3232
int x[3 * n];
33-
return &x == (int(*)[3 * n]) x;
33+
return &x == (int (*)[3 * n]) x;
3434
}

sulong/tests/com.oracle.truffle.llvm.tests.sulong.native/c/truffle-c/arrayTest/constSizeVarArray2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -31,7 +31,7 @@ char n = 5;
3131

3232
int func() {
3333
int x[3 * n];
34-
return &x == (int(*)[3 * n]) x;
34+
return &x == (int (*)[3 * n]) x;
3535
}
3636

3737
int main() {

sulong/tests/com.oracle.truffle.llvm.tests.sulong.native/c/truffle-c/functionTest/functionTestSpecialFormat1.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2022, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -29,7 +29,9 @@
2929
*/
3030
int test(t)
3131
int t;
32-
{ return t + 1; }
32+
{
33+
return t + 1;
34+
}
3335

3436
int main() {
3537
return test(3);

sulong/tests/com.oracle.truffle.llvm.tests.sulong.native/c/truffle-c/structTest/compoundLiteral.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -34,6 +34,6 @@ struct test {
3434

3535
int main() {
3636
struct test t;
37-
t = (struct test){ 4 + 5, 2 };
37+
t = (struct test) { 4 + 5, 2 };
3838
return t.a + t.b;
3939
}

0 commit comments

Comments
 (0)