[llvm] [FileCheck] Add a diff output option for FileCheck (PR #187120)
Shivam Gupta via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 9 12:00:27 PDT 2026
================
@@ -2961,20 +2960,17 @@ bool FileCheck::checkInput(SourceMgr &SM, StringRef Buffer,
// treated as a stray line. Even if a match is found later, we report
// the gap as a mismatch.
----------------
xgupta wrote:
> This comment still feels misleading. "any text found between the current position and the match is treated as a stray" is true any time `IsStrict` is true, right, not just when diff mode is enabled?
Yes, but main thing is in diff mode, we call handleDiffFailure to immediately print the mismatch and stop processing further while marking ChecksFailed to true.
How is this -
```
// In Diff Mode, while doing strick checking even if we found a match
// later, we must stop processing this block and print the gap as
// mismatch.
```
Let me know if you have suggestion.
https://github.com/llvm/llvm-project/pull/187120
More information about the llvm-commits
mailing list