From: Paul Robinson Date: Thu, 13 Nov 2014 00:36:34 +0000 (+0000) Subject: Drop a few unneeded ctor calls (missed code review comment). X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=4848765635003f47ba9db2f72385c5d8a2883824 Drop a few unneeded ctor calls (missed code review comment). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221845 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Support/Path.cpp b/unittests/Support/Path.cpp index d7c216a5777..ffd8d0c5c3a 100644 --- a/unittests/Support/Path.cpp +++ b/unittests/Support/Path.cpp @@ -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);