================
@@ -487,30 +374,22 @@ TEST_F(FileManagerTest, getFileRefEquality) {
// here by checking the size.
TEST_F(FileManagerTest, getVirtualFileWithDifferentName) {
// Inject fake files into the file system.
- auto statCache = std::make_unique<FakeStatCache>();
- statCache->InjectDirectory("c:\\tmp", 42);
- statCache->InjectFile("c:\\tmp\\test", 43);
-
- manager.setStatCache(std::move(statCache));
+ FS->addFileNoOwn("/tmp/test", ModTime, *EmptyBuf);
// Inject the virtual file:
- FileEntryRef file1 = manager.getVirtualFileRef("c:\\tmp\\test", 123, 1);
- EXPECT_EQ(43U, file1.getUniqueID().getFile());
+ FileEntryRef file1 = manager.getVirtualFileRef("/tmp/test", 123, 1);
EXPECT_EQ(123, file1.getSize());
// Lookup the virtual file with a different name:
- auto file2 = manager.getOptionalFileRef("c:/tmp/test", 100, 1);
+ auto file2 = manager.getOptionalFileRef("/tmp/./test", 100, 1);
----------------
RKSimon wrote:
@jansvoboda11 MSVC is now warning that in this getOptionalFileRef call we're
passing '100' to an arg that takes a bool type:
```
OptionalFileEntryRef getOptionalFileRef(StringRef Filename,
bool OpenFile = false,
bool CacheFailure = true,
bool IsText = true)
```
Should this have been a getVirtualFileRef call?
https://github.com/llvm/llvm-project/pull/198411
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits