Drop a few unneeded ctor calls (missed code review comment).
authorPaul Robinson <paul_robinson@playstation.sony.com>
Thu, 13 Nov 2014 00:36:34 +0000 (00:36 +0000)
committerPaul Robinson <paul_robinson@playstation.sony.com>
Thu, 13 Nov 2014 00:36:34 +0000 (00:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221845 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Support/Path.cpp

index d7c216a..ffd8d0c 100644 (file)
@@ -397,7 +397,7 @@ TEST_F(FileSystemTest, TempFiles) {
     "abcdefghijklmnopqrstuvwxyz5abcdefghijklmnopqrstuvwxyz4"
     "abcdefghijklmnopqrstuvwxyz3abcdefghijklmnopqrstuvwxyz2"
     "abcdefghijklmnopqrstuvwxyz1abcdefghijklmnopqrstuvwxyz0";
-  EXPECT_EQ(fs::createUniqueFile(Twine(Path270), FileDescriptor, TempPath),
+  EXPECT_EQ(fs::createUniqueFile(Path270, FileDescriptor, TempPath),
             errc::invalid_argument);
   // Relative path < 247 chars, no problem.
   const char *Path216 =
@@ -405,7 +405,7 @@ TEST_F(FileSystemTest, TempFiles) {
     "abcdefghijklmnopqrstuvwxyz5abcdefghijklmnopqrstuvwxyz4"
     "abcdefghijklmnopqrstuvwxyz3abcdefghijklmnopqrstuvwxyz2"
     "abcdefghijklmnopqrstuvwxyz1abcdefghijklmnopqrstuvwxyz0";
-  ASSERT_NO_ERROR(fs::createTemporaryFile(Twine(Path216), "", TempPath));
+  ASSERT_NO_ERROR(fs::createTemporaryFile(Path216, "", TempPath));
   ASSERT_NO_ERROR(fs::remove(Twine(TempPath)));
 #endif
 }
@@ -456,10 +456,10 @@ TEST_F(FileSystemTest, CreateDir) {
   // While we're here, prove that .. and . handling works in these long paths.
   const char *DotDotDirs = "\\..\\.\\b";
   LongDir.append(DotDotDirs);
-  ASSERT_NO_ERROR(fs::create_directory(Twine("b")));
+  ASSERT_NO_ERROR(fs::create_directory("b"));
   ASSERT_EQ(fs::create_directory(Twine(LongDir), false), errc::file_exists);
   // And clean up.
-  ASSERT_NO_ERROR(fs::remove(Twine("b")));
+  ASSERT_NO_ERROR(fs::remove("b"));
   ASSERT_NO_ERROR(fs::remove(
     Twine(LongDir.substr(0, LongDir.size() - strlen(DotDotDirs)))));
   ASSERT_NE(::SetCurrentDirectoryA(PreviousDir), 0);