[libc-commits] [libc] Ab 233205 (PR #235422)
via libc-commits
libc-commits at lists.llvm.org
Sun Oct 25 04:39:48 PDT 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 h,cpp -- libc/src/__support/math/rsqrtbf16.h libc/src/math/generic/rsqrtbf16.cpp libc/src/math/rsqrtbf16.h libc/test/src/math/smoke/RsqrtTest.h libc/test/src/math/smoke/rsqrtbf16_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/src/__support/math/rsqrtbf16.h b/libc/src/__support/math/rsqrtbf16.h
index f7cbac8fe..1b5e58158 100644
--- a/libc/src/__support/math/rsqrtbf16.h
+++ b/libc/src/__support/math/rsqrtbf16.h
@@ -10,19 +10,19 @@
#define LLVM_LIBC_SRC___SUPPORT_MATH_RSQRTBF16_H
#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/FPUtil/cast.h"
#include "src/__support/FPUtil/sqrt.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include "src/__support/FPUtil/cast.h"
namespace LIBC_NAMESPACE_DECL {
namespace math {
-LIBC_INLINE bfloat16 rsqrtbf16(bfloat16 x) {
+LIBC_INLINE bfloat16 rsqrtbf16(bfloat16 x) {
- float xf = fputil::cast<float>(x);
- return fputil::cast<bfloat16>(1.0f/fputil::sqrt<float>(xf));
- }
+ float xf = fputil::cast<float>(x);
+ return fputil::cast<bfloat16>(1.0f / fputil::sqrt<float>(xf));
+}
} // namespace math
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/rsqrtbf16.h b/libc/src/math/rsqrtbf16.h
index f25a10343..e6dfc28e5 100644
--- a/libc/src/math/rsqrtbf16.h
+++ b/libc/src/math/rsqrtbf16.h
@@ -1,4 +1,5 @@
-//===-- Implementation header for rsqrtbf16 ----------------------*- C++ -*-===//
+//===-- Implementation header for rsqrtbf16 ----------------------*- C++
+//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
``````````
</details>
https://github.com/llvm/llvm-project/pull/235422
More information about the libc-commits
mailing list