[clang] 69074bf - [clang] NFCI: Use `FileEntryRef` in `FileManagerTest`
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 20 18:41:33 PDT 2023
Author: Jan Svoboda
Date: 2023-09-20T18:41:25-07:00
New Revision: 69074bf144c1bf54040d289584e3d1d54f883a37
URL: https://github.com/llvm/llvm-project/commit/69074bf144c1bf54040d289584e3d1d54f883a37
DIFF: https://github.com/llvm/llvm-project/commit/69074bf144c1bf54040d289584e3d1d54f883a37.diff
LOG: [clang] NFCI: Use `FileEntryRef` in `FileManagerTest`
Added:
Modified:
clang/unittests/Basic/FileManagerTest.cpp
Removed:
################################################################################
diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp
index 4c8205b68a02fe6..bf30fabb7cd8878 100644
--- a/clang/unittests/Basic/FileManagerTest.cpp
+++ b/clang/unittests/Basic/FileManagerTest.cpp
@@ -547,7 +547,7 @@ TEST_F(FileManagerTest, getBypassFile) {
Manager.setStatCache(std::move(Cache));
// Set up a virtual file with a
diff erent size than FakeStatCache uses.
- const FileEntry *File = Manager.getVirtualFile("/tmp/test", /*Size=*/10, 0);
+ FileEntryRef File = Manager.getVirtualFileRef("/tmp/test", /*Size=*/10, 0);
ASSERT_TRUE(File);
const FileEntry &FE = *File;
EXPECT_EQ(FE.getSize(), 10);
@@ -562,7 +562,7 @@ TEST_F(FileManagerTest, getBypassFile) {
EXPECT_EQ(FE.getSize(), 10);
// Bypass the file.
- OptionalFileEntryRef BypassRef = Manager.getBypassFile(File->getLastRef());
+ OptionalFileEntryRef BypassRef = Manager.getBypassFile(File);
ASSERT_TRUE(BypassRef);
EXPECT_EQ("/tmp/test", BypassRef->getName());
More information about the cfe-commits
mailing list