[flang-commits] [flang] [flang] Recognize IARGC and GETARG as aliases for F2003 intrinsics (PR #173973)

via flang-commits flang-commits at lists.llvm.org
Tue Dec 30 09:02:22 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 cpp -- flang/lib/Evaluate/intrinsics.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/lib/Evaluate/intrinsics.cpp b/flang/lib/Evaluate/intrinsics.cpp
index 1a66e7576..799176810 100644
--- a/flang/lib/Evaluate/intrinsics.cpp
+++ b/flang/lib/Evaluate/intrinsics.cpp
@@ -1164,7 +1164,7 @@ static const IntrinsicInterface genericIntrinsicFunction[]{
 // Aliases for a few generic procedures for legacy compatibility and builtins.
 static const std::pair<const char *, const char *> genericAlias[]{
     {"and", "iand"},
-    {"getarg", "get_command_argument"}, 
+    {"getarg", "get_command_argument"},
     {"getenv", "get_environment_variable"},
     {"fseek64", "fseek"},
     {"fseeko64", "fseek"}, // SUN
@@ -1173,7 +1173,7 @@ static const std::pair<const char *, const char *> genericAlias[]{
     {"ftello64", "ftell"}, // SUN
     {"ftelli8", "ftell"}, // Intel
     {"imag", "aimag"},
-    {"iargc", "command_argument_count"}, 
+    {"iargc", "command_argument_count"},
     {"lshift", "shiftl"},
     {"or", "ior"},
     {"rshift", "shifta"},

``````````

</details>


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


More information about the flang-commits mailing list