[clang] [clang][deps] Add in-flight query caching to `DependencyScanningFilesystemSharedCache` (PR #199680)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Wed May 27 09:09:26 PDT 2026
================
@@ -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
More information about the cfe-commits
mailing list