[clang] c71bfc5 - [clang] Fix FileManagerTest

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 25 10:54:57 PDT 2024


Author: Jan Svoboda
Date: 2024-09-25T10:54:40-07:00
New Revision: c71bfc59ee1cec32d56a82476461e242398f82ca

URL: https://github.com/llvm/llvm-project/commit/c71bfc59ee1cec32d56a82476461e242398f82ca
DIFF: https://github.com/llvm/llvm-project/commit/c71bfc59ee1cec32d56a82476461e242398f82ca.diff

LOG: [clang] Fix FileManagerTest

Compilation failure caused by b1aea98cfa357e23f4bb52232da5f41781f23bff.

Added: 
    

Modified: 
    clang/unittests/Basic/FileManagerTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp
index 53897322f61609..88d778fccd68e0 100644
--- a/clang/unittests/Basic/FileManagerTest.cpp
+++ b/clang/unittests/Basic/FileManagerTest.cpp
@@ -255,8 +255,8 @@ TEST_F(FileManagerTest, getFileReturnsSameFileEntryForAliasedRealFiles) {
 
   EXPECT_EQ("abc/foo.cpp", r1->getName());
   EXPECT_EQ("abc/bar.cpp", r2->getName());
-  EXPECT_EQ((f1 ? *f1 : nullptr), &r1->getFileEntry());
-  EXPECT_EQ((f2 ? *f2 : nullptr), &r2->getFileEntry());
+  EXPECT_EQ((f1 ? &f1->getFileEntry() : nullptr), &r1->getFileEntry());
+  EXPECT_EQ((f2 ? &f2->getFileEntry() : nullptr), &r2->getFileEntry());
 }
 
 TEST_F(FileManagerTest, getFileRefReturnsCorrectNameForDifferentStatPath) {


        


More information about the cfe-commits mailing list