[libcxx-commits] [libcxx] [libcxxabi] [libunwind] [runtimes][NFC] Consistently declare main() functions in tests (PR #162548)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 8 13:51:08 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- libcxx/test/std/localization/codecvt_unicode.pass.cpp libcxx/test/std/ranges/range.access/include.iterator.pass.cpp libcxxabi/test/forced_unwind4.pass.cpp libcxxabi/test/native/AArch64/ra_sign_state.pass.cpp libunwind/test/aarch64_vg_unwind.pass.cpp libunwind/test/bad_unwind_info.pass.cpp libunwind/test/eh_frame_fde_pc_range.pass.cpp libunwind/test/floatregister.pass.cpp libunwind/test/forceunwind.pass.cpp libunwind/test/unw_resume.pass.cpp libunwind/test/unwind_scalable_vectors.pass.cpp
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxxabi/test/forced_unwind4.pass.cpp b/libcxxabi/test/forced_unwind4.pass.cpp
index 241bc2982..fbc8128af 100644
--- a/libcxxabi/test/forced_unwind4.pass.cpp
+++ b/libcxxabi/test/forced_unwind4.pass.cpp
@@ -17,9 +17,7 @@
 
 // Android/Bionic does not support pthread_cancel.
 #ifdef __BIONIC__
-int main(int, char**) {
-  return 0;
-}
+int main(int, char**) { return 0; }
 #else
 
 #include <chrono>
diff --git a/libunwind/test/bad_unwind_info.pass.cpp b/libunwind/test/bad_unwind_info.pass.cpp
index 95fdb282d..272a83f64 100644
--- a/libunwind/test/bad_unwind_info.pass.cpp
+++ b/libunwind/test/bad_unwind_info.pass.cpp
@@ -77,7 +77,7 @@ extern "C" void stepper() {
   assert(unw_step(&cursor) <= 0);
 }
 
-int main(int, char**) {
+int main(int, char **) {
   bad_unwind_info();
   return 0;
 }
diff --git a/libunwind/test/eh_frame_fde_pc_range.pass.cpp b/libunwind/test/eh_frame_fde_pc_range.pass.cpp
index c28a2759c..795ce6680 100644
--- a/libunwind/test/eh_frame_fde_pc_range.pass.cpp
+++ b/libunwind/test/eh_frame_fde_pc_range.pass.cpp
@@ -53,7 +53,7 @@ void f() {
   assert(fde_fpc == fde_fpc1);
 }
 
-int main(int, char**) {
+int main(int, char **) {
   f();
   return 0;
 }
diff --git a/libunwind/test/unw_resume.pass.cpp b/libunwind/test/unw_resume.pass.cpp
index 17c3e8a4f..e1f40b4a4 100644
--- a/libunwind/test/unw_resume.pass.cpp
+++ b/libunwind/test/unw_resume.pass.cpp
@@ -25,7 +25,7 @@ __attribute__((noinline)) void test_unw_resume() {
   unw_resume(&cursor);
 }
 
-int main(int, char**) {
+int main(int, char **) {
   test_unw_resume();
   return 0;
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/162548


More information about the libcxx-commits mailing list