[libc-commits] [libc] [libc][math] Refactor the `math_errhandling` macro definition (PR #166350)

via libc-commits libc-commits at lists.llvm.org
Wed Nov 5 02:23:48 PST 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 h -- libc/include/llvm-libc-macros/math-macros.h --diff_from_common_commit
``````````

: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/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h
index 9fda20f11..e1b12e301 100644
--- a/libc/include/llvm-libc-macros/math-macros.h
+++ b/libc/include/llvm-libc-macros/math-macros.h
@@ -51,9 +51,10 @@
 #define __LIBC_SUPPORTS_MATH_ERRNO 1
 #endif
 
-#if defined(__FAST_MATH__) || ((defined(__arm__) || defined(_M_ARM) || defined(__thumb__) ||              \
-     defined(__aarch64__) || defined(_M_ARM64)) &&                             \
-    !defined(__ARM_FP))
+#if defined(__FAST_MATH__) ||                                                  \
+    ((defined(__arm__) || defined(_M_ARM) || defined(__thumb__) ||             \
+      defined(__aarch64__) || defined(_M_ARM64)) &&                            \
+     !defined(__ARM_FP))
 #define __LIBC_SUPPORTS_MATH_ERREXCEPT 0
 #else
 #define __LIBC_SUPPORTS_MATH_ERREXCEPT 1

``````````

</details>


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


More information about the libc-commits mailing list