[llvm-branch-commits] [flang] [flang] Add traits to more AST nodes (PR #175566)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jan 12 07:45:57 PST 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,h -- flang/include/flang/Parser/parse-tree-visitor.h flang/include/flang/Parser/parse-tree.h flang/lib/Lower/Bridge.cpp flang/lib/Lower/PFTBuilder.cpp flang/lib/Parser/parse-tree.cpp flang/lib/Parser/unparse.cpp flang/lib/Semantics/check-do-forall.cpp flang/lib/Semantics/expression.cpp flang/lib/Semantics/program-tree.cpp flang/lib/Semantics/resolve-names.cpp flang/lib/Semantics/tools.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/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index 1d72c1cb1..c03823b60 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -3251,8 +3251,8 @@ struct CallStmt {
         t;
   };
   explicit CallStmt(ProcedureDesignator &&pd, std::optional<Chevrons> &&ch,
-      std::list<ActualArgSpec> &&args) :
-      CallStmt(Call{std::move(pd), std::move(args)}, std::move(ch)) {}
+      std::list<ActualArgSpec> &&args)
+      : CallStmt(Call{std::move(pd), std::move(args)}, std::move(ch)) {}
   std::tuple<Call, std::optional<Chevrons>> t;
   CharBlock source;
   mutable TypedCall typedCall; // filled by semantics
diff --git a/flang/lib/Semantics/expression.cpp b/flang/lib/Semantics/expression.cpp
index ece5d23bb..d0296e4b1 100644
--- a/flang/lib/Semantics/expression.cpp
+++ b/flang/lib/Semantics/expression.cpp
@@ -918,8 +918,8 @@ MaybeExpr ExpressionAnalyzer::Analyze(const parser::RealLiteralConstant &x) {
     }
   }
   bool isDefaultKind{!xkind && letterKind.value_or('e') == 'e'};
-  auto result{common::SearchTypes(RealTypeVisitor{
-      kind, xreal.source, GetFoldingContext(), isDefaultKind})};
+  auto result{common::SearchTypes(
+      RealTypeVisitor{kind, xreal.source, GetFoldingContext(), isDefaultKind})};
   if (!result) { // C717
     Say("Unsupported REAL(KIND=%d)"_err_en_US, kind);
   }
diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index 04d734781..fa47c52e8 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -4670,8 +4670,8 @@ bool SubprogramVisitor::Pre(const parser::Suffix &suffix) {
         }
       }
     } else {
-      Message &msg{Say(*resultName,
-          "RESULT(%s) may appear only in a function"_err_en_US)};
+      Message &msg{Say(
+          *resultName, "RESULT(%s) may appear only in a function"_err_en_US)};
       if (const Symbol * subprogram{InclusiveScope().symbol()}) {
         msg.Attach(subprogram->name(), "Containing subprogram"_en_US);
       }

``````````

</details>


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


More information about the llvm-branch-commits mailing list