[libc-commits] [libc] [libc] Implement CMPLX related macros (PR #156344)

via libc-commits libc-commits at lists.llvm.org
Tue Sep 2 07:28:05 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,h -- libc/include/llvm-libc-macros/complex-macros.h libc/test/include/complex_test.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/libc/test/include/complex_test.cpp b/libc/test/include/complex_test.cpp
index 55aca9d10..9ad67a895 100644
--- a/libc/test/include/complex_test.cpp
+++ b/libc/test/include/complex_test.cpp
@@ -26,11 +26,11 @@ TEST(LlvmLibcComplexTest, CMPLXMacro) {
   EXPECT_CFP_EQ(CMPLXL(0, 1.0l), I);
   EXPECT_CFP_EQ(CMPLXL(1.0l, 0), 1.0l);
 
-// TODO: Uncomment these after issues#156463 is resolved.
-// #ifdef LIBC_TYPES_HAS_FLOAT16
-//   EXPECT_CFP_EQ(CMPLXF16(0, 1.0), I);
-//   EXPECT_CFP_EQ(CMPLXF16(1.0, 0), 1.0);
-// #endif // LIBC_TYPES_HAS_FLOAT16
+  // TODO: Uncomment these after issues#156463 is resolved.
+  // #ifdef LIBC_TYPES_HAS_FLOAT16
+  //   EXPECT_CFP_EQ(CMPLXF16(0, 1.0), I);
+  //   EXPECT_CFP_EQ(CMPLXF16(1.0, 0), 1.0);
+  // #endif // LIBC_TYPES_HAS_FLOAT16
 
 #ifdef LIBC_TYPES_HAS_FLOAT128
   EXPECT_CFP_EQ(CMPLXF128(0, 1.0), I);

``````````

</details>


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


More information about the libc-commits mailing list