================
@@ -1031,5 +1035,37 @@ TEST(BackgroundIndex, Profile) {
UnorderedElementsAre(Pair("slabs", _), Pair("index", _)));
}
+// Verify shard filenames are unchanged when no path mappings are used
+TEST(BackgroundIndexStorage, ShardFilenameUnchangedWithoutPathMappings) {
+ llvm::SmallString<256> TempDir;
+ ASSERT_FALSE(llvm::sys::fs::createUniqueDirectory("clangd-test", TempDir));
+ llvm::scope_exit Cleanup([&] { llvm::sys::fs::remove_directories(TempDir);
});
----------------
ArcsinX wrote:
Instead of a real file system, you should use `MemoryShardStorage` here. We
typically don't create real files in unit tests. Files may remain on disk
during crashes.
https://github.com/llvm/llvm-project/pull/180285
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits