[llvm-branch-commits] [llvm] [FileCheck][NFC] Complete FileCheckDiag class hierarchy (PR #195571)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun May 3 18:24:40 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 -- llvm/include/llvm/FileCheck/FileCheck.h llvm/lib/FileCheck/FileCheck.cpp llvm/lib/FileCheck/FileCheckImpl.h llvm/unittests/FileCheck/FileCheckTest.cpp llvm/utils/FileCheck/FileCheck.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/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp
index 459e13cd2..3088777fa 100644
--- a/llvm/utils/FileCheck/FileCheck.cpp
+++ b/llvm/utils/FileCheck/FileCheck.cpp
@@ -475,8 +475,8 @@ buildInputAnnotations(const SourceMgr &SM, unsigned CheckFileBufferID,
       assert(isa<MatchNoteDiag>(Diag.get()) &&
              "expected only MatchNoteDiag to have no input range");
       const MatchResultDiag &MRD = Diag->getMatchResultDiag();
-      InputRange = MRD.getMatchRange() ? *MRD.getMatchRange()
-                                       : MRD.getSearchRange();
+      InputRange =
+          MRD.getMatchRange() ? *MRD.getMatchRange() : MRD.getSearchRange();
       InputRange.End = InputRange.Start;
     }
     auto [InputStartLine, InputStartCol] =

``````````

</details>


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


More information about the llvm-branch-commits mailing list