[flang-commits] [flang] [flang] Diagnose calling impure final procedure due to finalization in FORALL (PR #85685)

via flang-commits flang-commits at lists.llvm.org
Mon Mar 18 12:46:11 PDT 2024


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 44c579f5b56e89c44ad508805f742601ce3db2b1 1a065aba0725399e47ae4a798ec678a5ac23a691 -- flang/lib/Semantics/check-do-forall.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang/lib/Semantics/check-do-forall.cpp b/flang/lib/Semantics/check-do-forall.cpp
index 67a7d63d06..51f536f3d7 100644
--- a/flang/lib/Semantics/check-do-forall.cpp
+++ b/flang/lib/Semantics/check-do-forall.cpp
@@ -440,11 +440,10 @@ public:
       CheckForImpureCall(assignment->rhs);
 
       if (IsVariable(assignment->lhs)) {
-        if (const Symbol *symbol{GetLastSymbol(assignment->lhs)}) {
+        if (const Symbol * symbol{GetLastSymbol(assignment->lhs)}) {
           if (auto impureFinal{
                   HasImpureFinal(*symbol, assignment->lhs.Rank())}) {
-            context_.SayWithDecl(
-                *symbol, parser::FindSourceLocation(stmt),
+            context_.SayWithDecl(*symbol, parser::FindSourceLocation(stmt),
                 "Impure procedure '%s' is referenced by finalization in a %s"_err_en_US,
                 impureFinal->name(), LoopKindName());
           }

``````````

</details>


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


More information about the flang-commits mailing list