Explorar o código

Fix a couple of warnings present in the filesystem tests.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273035 91177308-0d34-0410-b5e6-96231b3b80d8
Eric Fiselier %!s(int64=9) %!d(string=hai) anos
pai
achega
05761e6861

+ 6 - 0
test/std/experimental/filesystem/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp

@@ -24,6 +24,12 @@
 #include "rapid-cxx-test.hpp"
 #include "filesystem_test_helper.hpp"
 
+// The filesystem specification explicitly allows for self-move on
+// the directory iterators. Turn off this warning so we can test it.
+#if defined(__clang__)
+#pragma clang diagnostic ignored "-Wself-move"
+#endif
+
 using namespace std::experimental::filesystem;
 
 TEST_SUITE(directory_iterator_move_assign_tests)

+ 4 - 4
test/std/experimental/filesystem/class.path/path.member/path.modifiers/replace_extension.pass.cpp

@@ -47,10 +47,10 @@ const ReplaceExtensionTestcase TestCases[] =
   };
 const ReplaceExtensionTestcase NoArgCases[] =
   {
-      {"", ""}
-    , {"foo", "foo"}
-    , {"foo.cpp", "foo"}
-    , {"foo..cpp", "foo."}
+      {"", "", ""}
+    , {"foo", "foo", ""}
+    , {"foo.cpp", "foo", ""}
+    , {"foo..cpp", "foo.", ""}
 };
 
 int main()

+ 6 - 0
test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp

@@ -24,6 +24,12 @@
 #include "rapid-cxx-test.hpp"
 #include "filesystem_test_helper.hpp"
 
+// The filesystem specification explicitly allows for self-move on
+// the directory iterators. Turn off this warning so we can test it.
+#if defined(__clang__)
+#pragma clang diagnostic ignored "-Wself-move"
+#endif
+
 using namespace std::experimental::filesystem;
 
 TEST_SUITE(recursive_directory_iterator_move_assign_tests)