[llvm] [LAA] Use diff checks for read-modify-write pointers (PR #226816)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 27 11:31:09 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 -- llvm/lib/Analysis/LoopAccessAnalysis.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/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index d2dad6119..719ee768d 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -513,8 +513,8 @@ bool RuntimePointerChecking::tryToCreateDiffCheck(
     const RuntimeCheckingPtrGroup &CGI, const RuntimeCheckingPtrGroup &CGJ) {
   // A read-modify-write pointer may occur multiple times in a group. Accept
   // such groups as long as all members refer to the same pointer info.
-  auto GetSinglePointer = [&](const RuntimeCheckingPtrGroup &CG)
-      -> const PointerInfo * {
+  auto GetSinglePointer =
+      [&](const RuntimeCheckingPtrGroup &CG) -> const PointerInfo * {
     unsigned Index = CG.Members.front();
     if (!all_of(CG.Members, [Index](unsigned I) { return I == Index; }))
       return static_cast<const PointerInfo *>(nullptr);

``````````

</details>


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


More information about the llvm-commits mailing list