[flang-commits] [flang] [llvm] [flang] Implement external routine usage of hostnm() (PR #134900)
via flang-commits
flang-commits at lists.llvm.org
Tue Apr 8 11:22:20 PDT 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 HEAD~1 HEAD --extensions cpp,h -- flang-rt/lib/runtime/extensions.cpp flang/include/flang/Runtime/extensions.h
``````````
</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 d1c426435..64cde444d 100644
--- a/flang-rt/lib/runtime/extensions.cpp
+++ b/flang-rt/lib/runtime/extensions.cpp
@@ -264,7 +264,7 @@ int RTNAME(Chdir)(const char *name) {
#endif
}
-int FORTRAN_PROCEDURE_NAME(hostnm)(char* hn, int length) {
+int FORTRAN_PROCEDURE_NAME(hostnm)(char *hn, int length) {
std::int32_t status{0};
@@ -293,8 +293,8 @@ int FORTRAN_PROCEDURE_NAME(hostnm)(char* hn, int length) {
if (status == 0) {
// Find zero terminator and fill the string from the
// zero terminator to the end with spaces
- char* str_end = hn + length;
- char* str_zero = std::find(hn, str_end, '\0');
+ char *str_end = hn + length;
+ char *str_zero = std::find(hn, str_end, '\0');
std::fill(str_zero, str_end, ' ');
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/134900
More information about the flang-commits
mailing list