================
@@ -286,3 +345,138 @@ TEST(DependencyScanningFilesystem,
DoNotDiagnoseDirSizeChange) {
auto InvalidEntries = SharedCache.getOutOfDateEntries(*FS);
EXPECT_EQ(InvalidEntries.size(), 0u);
}
+
+TEST(DependencyScanningWorkerFilesystem, ConcurrentSameFilenameDeduplicates) {
+ auto InMemoryFS = llvm::makeIntrusiveRefCnt<llvm::vfs::InMemoryFileSystem>();
----------------
jansvoboda11 wrote:
The `InMemoryFileSystem` is not thread-safe, so if we were to introduce a bug
in the caching VFS (or run this test with the old implementation), instead of
seeing `EXPECT_` failures, we'd see crashes and other weirdness. In this case,
I think I'd prefer if we created a temporary on-disk file and the real VFS.
https://github.com/llvm/llvm-project/pull/199680
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits