[libc-commits] [libc] [llvm] [libc][math] Refactor fabs family to header-only (PR #182173)
via libc-commits
libc-commits at lists.llvm.org
Wed Mar 4 13:05:24 PST 2026
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/shared/math/fabs.h libc/shared/math/fabsbf16.h libc/shared/math/fabsf.h libc/shared/math/fabsf128.h libc/shared/math/fabsf16.h libc/shared/math/fabsl.h libc/src/__support/math/fabs.h libc/src/__support/math/fabsbf16.h libc/src/__support/math/fabsf.h libc/src/__support/math/fabsf128.h libc/src/__support/math/fabsf16.h libc/src/__support/math/fabsl.h libc/shared/math.h libc/src/math/generic/fabs.cpp libc/src/math/generic/fabsbf16.cpp libc/src/math/generic/fabsf.cpp libc/src/math/generic/fabsf128.cpp libc/src/math/generic/fabsf16.cpp libc/src/math/generic/fabsl.cpp libc/test/shared/shared_math_test.cpp --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/shared/math.h b/libc/shared/math.h
index b61090632..f3ccf501a 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -114,15 +114,15 @@
#include "math/f16subf.h"
#include "math/f16subf128.h"
#include "math/f16subl.h"
-#include "math/fadd.h"
-#include "math/faddf128.h"
-#include "math/faddl.h"
#include "math/fabs.h"
#include "math/fabsbf16.h"
#include "math/fabsf.h"
#include "math/fabsf128.h"
#include "math/fabsf16.h"
#include "math/fabsl.h"
+#include "math/fadd.h"
+#include "math/faddf128.h"
+#include "math/faddl.h"
#include "math/fdim.h"
#include "math/fdimbf16.h"
#include "math/fdimf.h"
``````````
</details>
https://github.com/llvm/llvm-project/pull/182173
More information about the libc-commits
mailing list