[llvm] r217618 - Use simpler version of sys::fs::exists. NFC.

Rafael Espindola rafael.espindola at gmail.com
Thu Sep 11 12:11:03 PDT 2014


Author: rafael
Date: Thu Sep 11 14:11:02 2014
New Revision: 217618

URL: http://llvm.org/viewvc/llvm-project?rev=217618&view=rev
Log:
Use simpler version of sys::fs::exists. NFC.

Modified:
    llvm/trunk/unittests/Support/Path.cpp

Modified: llvm/trunk/unittests/Support/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Path.cpp?rev=217618&r1=217617&r2=217618&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/Path.cpp (original)
+++ llvm/trunk/unittests/Support/Path.cpp Thu Sep 11 14:11:02 2014
@@ -334,9 +334,7 @@ TEST_F(FileSystemTest, TempFiles) {
       fs::createTemporaryFile("prefix", "temp", FileDescriptor, TempPath));
 
   // Make sure it exists.
-  bool TempFileExists;
-  ASSERT_NO_ERROR(sys::fs::exists(Twine(TempPath), TempFileExists));
-  EXPECT_TRUE(TempFileExists);
+  ASSERT_TRUE(sys::fs::exists(Twine(TempPath)));
 
   // Create another temp tile.
   int FD2;
@@ -363,6 +361,7 @@ TEST_F(FileSystemTest, TempFiles) {
   EXPECT_EQ(B.type(), fs::file_type::file_not_found);
 
   // Make sure Temp2 doesn't exist.
+  bool TempFileExists;
   ASSERT_NO_ERROR(fs::exists(Twine(TempPath2), TempFileExists));
   EXPECT_FALSE(TempFileExists);
 





More information about the llvm-commits mailing list