[llvm-branch-commits] [flang] [flang] Detect loops whose branching is confined to their body (PR #225757)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 25 02:24:30 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,h -- flang/include/flang/Lower/PFTBuilder.h flang/lib/Lower/PFTBuilder.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/Lower/PFTBuilder.cpp b/flang/lib/Lower/PFTBuilder.cpp
index 8e3fea3d3..5497edc28 100644
--- a/flang/lib/Lower/PFTBuilder.cpp
+++ b/flang/lib/Lower/PFTBuilder.cpp
@@ -2814,8 +2814,7 @@ startsExitFreeGotoCycle(const Fortran::lower::pft::Evaluation &start) {
   };
 
   llvm::SmallPtrSet<const Fortran::lower::pft::Evaluation *, 4> visited;
-  for (const Fortran::lower::pft::Evaluation *e = &start; e;
-       e = gotoTarget(*e))
+  for (const Fortran::lower::pft::Evaluation *e = &start; e; e = gotoTarget(*e))
     if (!visited.insert(e).second)
       return true;
   return false;

``````````

</details>


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


More information about the llvm-branch-commits mailing list