[flang-commits] [flang] [flang] Fix fixed line length overflow diagnostic (PR #233353)
via flang-commits
flang-commits at lists.llvm.org
Sun Oct 18 23:47:01 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 cpp -- flang/lib/Frontend/CompilerInvocation.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/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index d7bd442ab..7c5851fde 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -871,10 +871,11 @@ static bool parseFrontendArgs(FrontendOptions &opts, llvm::opt::ArgList &args,
columns = 0;
} else if (argValue.getAsInteger(/*Radix=*/10, columns)) {
if (!argValue.empty() &&
- std::all_of(argValue.begin(), argValue.end(),
- [](char c) { return c >= '0' && c <= '9';})) {
+ std::all_of(argValue.begin(), argValue.end(),
+ [](char c) { return c >= '0' && c <= '9'; })) {
// Route oversized +ve decimals to the large-columns diagnostic below.
- columns = static_cast<std::int64_t>(std::numeric_limits<int>::max()) + 1;
+ columns =
+ static_cast<std::int64_t>(std::numeric_limits<int>::max()) + 1;
} else {
columns = -1;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/233353
More information about the flang-commits
mailing list