[libc-commits] [libc] [libc]: Add -Wextra for libc tests (PR #133643)

via libc-commits libc-commits at lists.llvm.org
Tue Apr 1 18:11:53 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 HEAD~1 HEAD --extensions cpp,h -- libc/test/UnitTest/FPExceptMatcher.cpp libc/test/UnitTest/FPExceptMatcher.h libc/test/UnitTest/HermeticTestUtils.cpp libc/test/UnitTest/LibcDeathTestExecutors.cpp libc/test/UnitTest/LibcTest.h libc/test/include/stdbit_stub.h libc/test/src/__support/CPP/integer_sequence_test.cpp libc/test/src/__support/freelist_heap_test.cpp libc/test/src/stdlib/StrfromTest.h libc/test/src/string/memory_utils/op_tests.cpp libc/test/src/strings/bzero_test.cpp libc/utils/MPFRWrapper/MPFRUtils.h
``````````

</details>

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

``````````diff
diff --git a/libc/test/include/stdbit_stub.h b/libc/test/include/stdbit_stub.h
index 368133f41..1c8da7507 100644
--- a/libc/test/include/stdbit_stub.h
+++ b/libc/test/include/stdbit_stub.h
@@ -17,10 +17,10 @@
 #include <stdbool.h> // bool in C
 
 #define STDBIT_STUB_FUNCTION(FUNC_NAME, LEADING_VAL)                           \
-  unsigned FUNC_NAME##_uc(unsigned char /*x*/) { return LEADING_VAL##AU; }         \
-  unsigned FUNC_NAME##_us(unsigned short /*x*/) { return LEADING_VAL##BU; }        \
-  unsigned FUNC_NAME##_ui(unsigned int /*x*/) { return LEADING_VAL##CU; }          \
-  unsigned FUNC_NAME##_ul(unsigned long /*x*/) { return LEADING_VAL##DU; }         \
+  unsigned FUNC_NAME##_uc(unsigned char /*x*/) { return LEADING_VAL##AU; }     \
+  unsigned FUNC_NAME##_us(unsigned short /*x*/) { return LEADING_VAL##BU; }    \
+  unsigned FUNC_NAME##_ui(unsigned int /*x*/) { return LEADING_VAL##CU; }      \
+  unsigned FUNC_NAME##_ul(unsigned long /*x*/) { return LEADING_VAL##DU; }     \
   unsigned FUNC_NAME##_ull(unsigned long long /*x*/) { return LEADING_VAL##EU; }
 
 __BEGIN_C_DECLS
@@ -48,12 +48,16 @@ unsigned char stdc_bit_floor_uc(unsigned char /*x*/) { return 0x5AU; }
 unsigned short stdc_bit_floor_us(unsigned short /*x*/) { return 0x5BU; }
 unsigned stdc_bit_floor_ui(unsigned /*x*/) { return 0x5CU; }
 unsigned long stdc_bit_floor_ul(unsigned long /*x*/) { return 0x5DUL; }
-unsigned long long stdc_bit_floor_ull(unsigned long long /*x*/) { return 0x5EULL; }
+unsigned long long stdc_bit_floor_ull(unsigned long long /*x*/) {
+  return 0x5EULL;
+}
 
 unsigned char stdc_bit_ceil_uc(unsigned char /*x*/) { return 0x6AU; }
 unsigned short stdc_bit_ceil_us(unsigned short /*x*/) { return 0x6BU; }
 unsigned stdc_bit_ceil_ui(unsigned /*x*/) { return 0x6CU; }
 unsigned long stdc_bit_ceil_ul(unsigned long /*x*/) { return 0x6DUL; }
-unsigned long long stdc_bit_ceil_ull(unsigned long long /*x*/) { return 0x6EULL; }
+unsigned long long stdc_bit_ceil_ull(unsigned long long /*x*/) {
+  return 0x6EULL;
+}
 
 __END_C_DECLS

``````````

</details>


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


More information about the libc-commits mailing list