[llvm-branch-commits] [clang] HIP: Use builtin_nan instead of manual expansion (PR #128023)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 20 08:13:21 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 c6c75b5d7a9a1869bfcdc413a98b00fe4b9f07d1 88b441975bc452c5b19d30b4d534fbce0b16dc0b --extensions h -- clang/lib/Headers/__clang_hip_math.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Headers/__clang_hip_math.h b/clang/lib/Headers/__clang_hip_math.h
index 8c21f5d882..1f62a06b50 100644
--- a/clang/lib/Headers/__clang_hip_math.h
+++ b/clang/lib/Headers/__clang_hip_math.h
@@ -519,9 +519,7 @@ float modff(float __x, float *__iptr) {
 }
 
 __DEVICE__
-float nanf(const char *__tagp) {
-  return __builtin_nanf(__tagp);
-}
+float nanf(const char *__tagp) { return __builtin_nanf(__tagp); }
 
 __DEVICE__
 float nearbyintf(float __x) { return __builtin_nearbyintf(__x); }
@@ -1055,9 +1053,7 @@ double modf(double __x, double *__iptr) {
 }
 
 __DEVICE__
-double nan(const char *__tagp) {
-  return __builtin_nan(__tagp);
-}
+double nan(const char *__tagp) { return __builtin_nan(__tagp); }
 
 __DEVICE__
 double nearbyint(double __x) { return __builtin_nearbyint(__x); }

``````````

</details>


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


More information about the llvm-branch-commits mailing list