Prechádzať zdrojové kódy

Clean up a bunch of warnings in the tests, 3 of which actually turned out to be test bugs.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131479 91177308-0d34-0410-b5e6-96231b3b80d8
Howard Hinnant 14 rokov pred
rodič
commit
97ecd64913
29 zmenil súbory, kde vykonal 54 pridanie a 4 odobranie
  1. 1 1
      test/thread/futures/futures.overview/launch.pass.cpp
  2. 1 1
      test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp
  3. 1 1
      test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp
  4. 2 0
      test/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
  5. 2 0
      test/utilities/template.bitset/bitset.cons/default.pass.cpp
  6. 2 0
      test/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp
  7. 2 0
      test/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
  8. 2 0
      test/utilities/template.bitset/bitset.members/count.pass.cpp
  9. 2 0
      test/utilities/template.bitset/bitset.members/flip_all.pass.cpp
  10. 2 0
      test/utilities/template.bitset/bitset.members/flip_one.pass.cpp
  11. 2 0
      test/utilities/template.bitset/bitset.members/index.pass.cpp
  12. 2 0
      test/utilities/template.bitset/bitset.members/index_const.pass.cpp
  13. 2 0
      test/utilities/template.bitset/bitset.members/left_shift.pass.cpp
  14. 2 0
      test/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp
  15. 2 0
      test/utilities/template.bitset/bitset.members/not_all.pass.cpp
  16. 2 0
      test/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp
  17. 2 0
      test/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp
  18. 2 0
      test/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp
  19. 2 0
      test/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp
  20. 2 0
      test/utilities/template.bitset/bitset.members/reset_all.pass.cpp
  21. 2 0
      test/utilities/template.bitset/bitset.members/right_shift.pass.cpp
  22. 2 0
      test/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp
  23. 2 0
      test/utilities/template.bitset/bitset.members/set_all.pass.cpp
  24. 2 0
      test/utilities/template.bitset/bitset.members/test.pass.cpp
  25. 2 0
      test/utilities/template.bitset/bitset.members/to_string.pass.cpp
  26. 2 0
      test/utilities/template.bitset/bitset.operators/op_and.pass.cpp
  27. 2 0
      test/utilities/template.bitset/bitset.operators/op_not.pass.cpp
  28. 2 0
      test/utilities/template.bitset/bitset.operators/op_or.pass.cpp
  29. 1 1
      test/utilities/utility/forward/move_only.pass.cpp

+ 1 - 1
test/thread/futures/futures.overview/launch.pass.cpp

@@ -20,7 +20,7 @@
 
 int main()
 {
-    static_assert(std::launch::any == std::launch::async | std::launch::deferred, "");
+    static_assert(std::launch::any == (std::launch::async | std::launch::deferred), "");
     static_assert(std::launch::async == 1, "");
     static_assert(std::launch::deferred == 2, "");
 }

+ 1 - 1
test/thread/futures/futures.tas/futures.task.members/ctor_func.pass.cpp

@@ -46,7 +46,7 @@ int main()
         assert(A::n_copies == 0);
         assert(A::n_moves > 0);
     }
-    A::n_copies == 0;
+    A::n_copies = 0;
     A::n_copies = 0;
     {
         A a(5);

+ 1 - 1
test/thread/futures/futures.tas/futures.task.members/ctor_func_alloc.pass.cpp

@@ -51,7 +51,7 @@ int main()
         assert(A::n_moves > 0);
     }
     assert(test_alloc_base::count == 0);
-    A::n_copies == 0;
+    A::n_copies = 0;
     A::n_copies = 0;
     {
         A a(5);

+ 2 - 0
test/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp

@@ -15,6 +15,8 @@
 #include <bitset>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 void test_char_pointer_ctor()
 {

+ 2 - 0
test/utilities/template.bitset/bitset.cons/default.pass.cpp

@@ -12,6 +12,8 @@
 #include <bitset>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 void test_default_ctor()
 {

+ 2 - 0
test/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp

@@ -12,6 +12,8 @@
 #include <bitset>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 void test_string_ctor()
 {

+ 2 - 0
test/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp

@@ -12,6 +12,8 @@
 #include <bitset>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 void test_val_ctor()
 {

+ 2 - 0
test/utilities/template.bitset/bitset.members/count.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/flip_all.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/flip_one.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/index.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/index_const.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/left_shift.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/not_all.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp

@@ -16,6 +16,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/reset_all.pass.cpp

@@ -12,6 +12,8 @@
 #include <bitset>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 void test_reset_all()
 {

+ 2 - 0
test/utilities/template.bitset/bitset.members/right_shift.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/set_all.pass.cpp

@@ -12,6 +12,8 @@
 #include <bitset>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 void test_set_all()
 {

+ 2 - 0
test/utilities/template.bitset/bitset.members/test.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.members/to_string.pass.cpp

@@ -26,6 +26,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.operators/op_and.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.operators/op_not.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 2 - 0
test/utilities/template.bitset/bitset.operators/op_or.pass.cpp

@@ -13,6 +13,8 @@
 #include <cstdlib>
 #include <cassert>
 
+#pragma clang diagnostic ignored "-Wtautological-compare"
+
 template <std::size_t N>
 std::bitset<N>
 make_bitset()

+ 1 - 1
test/utilities/utility/forward/move_only.pass.cpp

@@ -26,7 +26,7 @@ public:
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     move_only(move_only&&) {}
-    move_only& operator=(move_only&&) {}
+    move_only& operator=(move_only&&) {return *this;}
 #else  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
     operator std::__rv<move_only> () {return std::__rv<move_only>(*this);}
     move_only(std::__rv<move_only>) {}