[llvm] [Flang-rt][build] fixes building warnings under gcc: (PR #173955)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 29 22:16:52 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,cpp -- flang-rt/include/flang-rt/runtime/numeric-templates.h flang-rt/lib/runtime/character.cpp flang-rt/lib/runtime/extensions.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/flang-rt/lib/runtime/extensions.cpp b/flang-rt/lib/runtime/extensions.cpp
index 84522afac..612f75991 100644
--- a/flang-rt/lib/runtime/extensions.cpp
+++ b/flang-rt/lib/runtime/extensions.cpp
@@ -455,7 +455,8 @@ float RTNAME(Rand)(int *i, const char *sourceFile, int line) {
     int shift_val = ((8 - digits) * 4 + 1);
     if (shift_val < 0) {
       Terminator terminator{sourceFile, line};
-      terminator.Crash("Radix 16: negative shift for mask. digits value maybe invalid.");
+      terminator.Crash(
+          "Radix 16: negative shift for mask. digits value maybe invalid.");
     } else {
       mask = ~(unsigned)0u << shift_val;
     }

``````````

</details>


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


More information about the llvm-commits mailing list