Use a filename without a line number as a cue for autoupdate. (#4677)

This is so that diagnostics which lack a location get split file
clustering.
This commit is contained in:
Jon Ross-Perkins
2024-12-13 00:05:33 +00:00
committed by GitHub
parent e71fd07dc6
commit 55c257bc93
8 changed files with 81 additions and 46 deletions
+1 -1
View File
@@ -277,7 +277,7 @@ auto FileTestBase::GetLineNumberReplacements(
-> llvm::SmallVector<LineNumberReplacement> {
return {{.has_file = true,
.re = std::make_shared<RE2>(
llvm::formatv(R"(({0}):(\d+))", llvm::join(filenames, "|"))),
llvm::formatv(R"(({0}):(\d+)?)", llvm::join(filenames, "|"))),
.line_formatv = R"({0})"}};
}