[libc-commits] [libc] [libc] Provide isnan, isnanf and isnanl functions (PR #96008)
via libc-commits
libc-commits at lists.llvm.org
Wed Jul 3 01:43:51 PDT 2024
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 e89890e8e510f2b76c8c4a2b2a6fc323b1e837ad 0ecb1eb7d98947ba16be86b7973c2e5f3bd014fb -- libc/include/llvm-libc-macros/math-function-macros.h libc/src/math/generic/isnan.cpp libc/src/math/generic/isnanf.cpp libc/src/math/generic/isnanl.cpp libc/src/math/isnan.h libc/src/math/isnanf.h libc/src/math/isnanl.h libc/include/llvm-libc-macros/math-macros.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/math/generic/isnan.cpp b/libc/src/math/generic/isnan.cpp
index 5406a69f68..dd7eadb2a2 100644
--- a/libc/src/math/generic/isnan.cpp
+++ b/libc/src/math/generic/isnan.cpp
@@ -11,8 +11,6 @@
namespace LIBC_NAMESPACE {
-LLVM_LIBC_FUNCTION(int, isnan, (double x)) {
- return __builtin_isnan(x);
-}
+LLVM_LIBC_FUNCTION(int, isnan, (double x)) { return __builtin_isnan(x); }
} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/generic/isnanf.cpp b/libc/src/math/generic/isnanf.cpp
index 2d93393607..98a81b03f5 100644
--- a/libc/src/math/generic/isnanf.cpp
+++ b/libc/src/math/generic/isnanf.cpp
@@ -11,8 +11,6 @@
namespace LIBC_NAMESPACE {
-LLVM_LIBC_FUNCTION(int, isnanf, (float x)) {
- return __builtin_isnan(x);
-}
+LLVM_LIBC_FUNCTION(int, isnanf, (float x)) { return __builtin_isnan(x); }
} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/generic/isnanl.cpp b/libc/src/math/generic/isnanl.cpp
index a700b636d0..d61bfd52f0 100644
--- a/libc/src/math/generic/isnanl.cpp
+++ b/libc/src/math/generic/isnanl.cpp
@@ -11,8 +11,6 @@
namespace LIBC_NAMESPACE {
-LLVM_LIBC_FUNCTION(int, isnanl, (long double x)) {
- return __builtin_isnan(x);
-}
+LLVM_LIBC_FUNCTION(int, isnanl, (long double x)) { return __builtin_isnan(x); }
} // namespace LIBC_NAMESPACE
``````````
</details>
https://github.com/llvm/llvm-project/pull/96008
More information about the libc-commits
mailing list