[llvm] [FileCheck]: Fix diagnostics for NOT prefixes (PR #78412)
Vinayak Dev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 08:56:37 PST 2024
================
@@ -1957,11 +1960,12 @@ bool FileCheck::readCheckFile(
}
// Add an EOF pattern for any trailing --implicit-check-not/CHECK-DAG/-NOTs,
- // and use the first prefix as a filler for the error message.
+ // and use the prefix from the last/trailing CHECK-NOT for the error message
if (!DagNotMatches.empty()) {
CheckStrings->emplace_back(
Pattern(Check::CheckEOF, PatternContext.get(), LineNumber + 1),
- *Req.CheckPrefixes.begin(), SMLoc::getFromPointer(Buffer.data()));
+ DagNotMatches.back().DagNotPrefix,
+ SMLoc::getFromPointer(Buffer.data()));
----------------
vinayakdsci wrote:
Okay!
https://github.com/llvm/llvm-project/pull/78412
More information about the llvm-commits
mailing list