diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-12-24 01:07:54 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-12-24 01:07:54 +0000 |
| commit | 6a74f448735b3dfea38bd2eec2a5cecb6ccdf652 (patch) | |
| tree | da5995307dd37e3cf82ced5157f90b1221d4540b /libcxx/test/std | |
| parent | 9eb96d5b080f2cc0b89656a8cef3759eacbe7e21 (diff) | |
| download | bcm5719-llvm-6a74f448735b3dfea38bd2eec2a5cecb6ccdf652.tar.gz bcm5719-llvm-6a74f448735b3dfea38bd2eec2a5cecb6ccdf652.zip | |
fix warnings only produced by apple-clang
llvm-svn: 290474
Diffstat (limited to 'libcxx/test/std')
8 files changed, 27 insertions, 44 deletions
diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp index c983a604ed1..64b3d811fdc 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp @@ -33,12 +33,12 @@ test2(unsigned n) assert(static_cast<unsigned>(DefaultOnly::count) == n); assert(d.size() == n); assert(static_cast<std::size_t>(distance(d.begin(), d.end())) == d.size()); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES for (const_iterator i = d.begin(), e = d.end(); i != e; ++i) assert(*i == T()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } assert(DefaultOnly::count == 0); +#else + ((void)n); #endif } @@ -54,10 +54,10 @@ test1(unsigned n) assert(static_cast<unsigned>(DefaultOnly::count) == n); assert(d.size() == n); assert(static_cast<std::size_t>(distance(d.begin(), d.end())) == d.size()); -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 for (const_iterator i = d.begin(), e = d.end(); i != e; ++i) assert(*i == T()); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif } assert(DefaultOnly::count == 0); } @@ -74,6 +74,9 @@ test3(unsigned n, Allocator const &alloc = Allocator()) assert(d.size() == n); assert(d.get_allocator() == alloc); } +#else + ((void)n); + ((void)alloc); #endif } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/size_type.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/size_type.pass.cpp index 6720a00cf11..95cdeb0c853 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/size_type.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/size_type.pass.cpp @@ -32,6 +32,9 @@ test3(unsigned n, Allocator const &alloc = Allocator()) assert(static_cast<std::size_t>(std::distance(d.begin(), d.end())) == n); assert(d.get_allocator() == alloc); } +#else + ((void)n); + ((void)alloc); #endif } @@ -76,14 +79,12 @@ int main() test3<int, min_allocator<int>> (3); } #endif -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 { std::list<DefaultOnly> l(3); assert(l.size() == 3); assert(std::distance(l.begin(), l.end()) == 3); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if TEST_STD_VER >= 11 { std::list<int, min_allocator<int>> l(3); assert(l.size() == 3); @@ -95,12 +96,10 @@ int main() ++i; assert(*i == 0); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { std::list<DefaultOnly, min_allocator<DefaultOnly>> l(3); assert(l.size() == 3); assert(std::distance(l.begin(), l.end()) == 3); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif } diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp index 271e4ee33aa..1fb86a24ab5 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp @@ -31,6 +31,9 @@ test2(typename C::size_type n, assert(c.get_allocator() == a); for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i) assert(*i == typename C::value_type()); +#else + ((void)n); + ((void)a); #endif } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp index 46e5ecdc9a5..7416a6ac9d7 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp @@ -32,6 +32,9 @@ test2(typename C::size_type n, typename C::allocator_type const& a = typename C: LIBCPP_ASSERT(is_contiguous_container_asan_correct(c)); for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i) assert(*i == typename C::value_type()); +#else + ((void)n); + ((void)a); #endif } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp index cc4e32e83cb..df69b52878d 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -30,23 +32,13 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, test_compare<std::equal_to<int> >, test_allocator<std::pair<const int, std::string> > > C; - typedef std::pair<int, std::string> P; - P a[] = - { - P(1, "one"), - P(2, "two"), - P(3, "three"), - P(4, "four"), - P(1, "four"), - P(2, "four"), - }; + C c0(7, test_hash<std::hash<int> >(8), test_compare<std::equal_to<int> >(9), @@ -130,23 +122,12 @@ int main() assert(c0.empty()); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, test_compare<std::equal_to<int> >, min_allocator<std::pair<const int, std::string> > > C; - typedef std::pair<int, std::string> P; - P a[] = - { - P(1, "one"), - P(2, "two"), - P(3, "three"), - P(4, "four"), - P(1, "four"), - P(2, "four"), - }; C c0(7, test_hash<std::hash<int> >(8), test_compare<std::equal_to<int> >(9), @@ -230,7 +211,6 @@ int main() assert(c0.empty()); } -#endif #if _LIBCPP_DEBUG >= 1 { std::unordered_multimap<int, int> s1 = {{1, 1}, {2, 2}, {3, 3}}; @@ -242,5 +222,4 @@ int main() assert(s2.size() == 2); } #endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp index cf9339341ab..cdd163980ef 100644 --- a/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp @@ -26226,25 +26226,25 @@ int main() std::locale lg(lc, new my_numpunct); const my_facet f(1); { - long double v = -INFINITY; + long double v = -INFINITY; ((void)v); } { - long double v = std::nan(""); + long double v = std::nan(""); ((void)v); } { - long double v = +0.; + long double v = +0.; ((void)v); } { - long double v = -INFINITY; + long double v = -INFINITY; ((void)v); } { - long double v = std::nan(""); + long double v = std::nan(""); ((void)v); } { - long double v = -INFINITY; + long double v = -INFINITY; ((void)v); } { - long double v = std::nan(""); + long double v = std::nan(""); ((void)v); } } diff --git a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp index be05afd4cf8..1634c5a39f3 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_string_type.pass.cpp @@ -24,7 +24,6 @@ int main() typedef std::sub_match<const CharT*> SM; typedef SM::string_type string; SM sm = SM(); - SM sm2 = SM(); assert(sm.compare(string()) == 0); const CharT s[] = {'1', '2', '3', 0}; sm.first = s; @@ -38,7 +37,6 @@ int main() typedef std::sub_match<const CharT*> SM; typedef SM::string_type string; SM sm = SM(); - SM sm2 = SM(); assert(sm.compare(string()) == 0); const CharT s[] = {'1', '2', '3', 0}; sm.first = s; diff --git a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp index 097a3918ed1..5e2ea8fb532 100644 --- a/libcxx/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp +++ b/libcxx/test/std/re/re.submatch/re.submatch.members/compare_value_type_ptr.pass.cpp @@ -23,7 +23,6 @@ int main() typedef char CharT; typedef std::sub_match<const CharT*> SM; SM sm = SM(); - SM sm2 = SM(); assert(sm.compare("") == 0); const CharT s[] = {'1', '2', '3', 0}; sm.first = s; @@ -36,7 +35,6 @@ int main() typedef wchar_t CharT; typedef std::sub_match<const CharT*> SM; SM sm = SM(); - SM sm2 = SM(); assert(sm.compare(L"") == 0); const CharT s[] = {'1', '2', '3', 0}; sm.first = s; |

