[flang-commits] [flang] [flang] Extract misparsed function reference check into function (PR #203899)
via flang-commits
flang-commits at lists.llvm.org
Mon Jun 15 06:16:52 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 h,cpp -- flang/include/flang/Semantics/expression.h flang/lib/Semantics/expression.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/Semantics/expression.cpp b/flang/lib/Semantics/expression.cpp
index aba4996bb..e776f4e6a 100644
--- a/flang/lib/Semantics/expression.cpp
+++ b/flang/lib/Semantics/expression.cpp
@@ -5596,8 +5596,8 @@ void NoteUsedSymbols(
evaluate::CollectUsedSymbolValues(context, expr, isDefinition));
}
-bool IsMisparsedArrayElement(SemanticsContext &context,
- const parser::FunctionReference &funcRef) {
+bool IsMisparsedArrayElement(
+ SemanticsContext &context, const parser::FunctionReference &funcRef) {
// Ensure that there are no argument keywords
for (const auto &arg :
std::get<std::list<parser::ActualArgSpec>>(funcRef.v.t)) {
@@ -5606,8 +5606,7 @@ bool IsMisparsedArrayElement(SemanticsContext &context,
}
}
auto &proc{std::get<parser::ProcedureDesignator>(funcRef.v.t)};
- if (const Symbol *
- origSymbol{common::visit(
+ if (const Symbol *origSymbol{common::visit(
common::visitors{
[&](const parser::Name &name) { return name.symbol; },
[&](const parser::ProcComponentRef &pcr) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/203899
More information about the flang-commits
mailing list