summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/Path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r--llvm/unittests/Support/Path.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index d19bf4a2efc..40e62811d02 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -128,7 +128,8 @@ TEST(Support, Path) {
EXPECT_TRUE(TempFileExists);
::close(FileDescriptor);
- ::remove(TempPath.c_str());
+ ASSERT_FALSE(fs::remove(Twine(TempPath), TempFileExists));
+ EXPECT_TRUE(TempFileExists);
ASSERT_FALSE(fs::exists(Twine(TempPath), TempFileExists));
EXPECT_FALSE(TempFileExists);
OpenPOWER on IntegriCloud