[libcxx] r289363 - Enable the -Wsign-compare warning to better support MSVC

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 10 21:31:01 PST 2016


Author: ericwf
Date: Sat Dec 10 23:31:00 2016
New Revision: 289363

URL: http://llvm.org/viewvc/llvm-project?rev=289363&view=rev
Log:
Enable the -Wsign-compare warning to better support MSVC

Modified:
    libcxx/trunk/include/vector
    libcxx/trunk/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp
    libcxx/trunk/test/libcxx/test/config.py
    libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
    libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp
    libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp
    libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
    libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
    libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp
    libcxx/trunk/test/std/experimental/string.view/string.view.iterators/end.pass.cpp
    libcxx/trunk/test/std/experimental/string.view/string.view.iterators/rend.pass.cpp
    libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
    libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
    libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp
    libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/access.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/const_access.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp
    libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp
    libcxx/trunk/test/std/utilities/function.objects/comparisons/pointer_comparison_test_helper.hpp
    libcxx/trunk/test/std/utilities/function.objects/unord.hash/integral.pass.cpp

Modified: libcxx/trunk/include/vector
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/vector?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/include/vector (original)
+++ libcxx/trunk/include/vector Sat Dec 10 23:31:00 2016
@@ -3093,7 +3093,9 @@ typename enable_if
 >::type
 vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last)
 {
-    difference_type __n = _VSTD::distance(__first, __last);
+    const difference_type __n_signed = _VSTD::distance(__first, __last);
+    _LIBCPP_ASSERT(__n_signed >= 0, "invalid range specified");
+    const size_type __n = static_cast<size_type>(__n_signed);
     iterator __r;
     size_type __c = capacity();
     if (__n <= __c && size() <= __c - __n)

Modified: libcxx/trunk/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp Sat Dec 10 23:31:00 2016
@@ -29,6 +29,7 @@
 #include <__config>
 
 #include <experimental/dynarray>
+#include <cstddef>
 #include <cassert>
 
 #include <algorithm>
@@ -46,10 +47,11 @@ void dyn_test_const ( const dynarray<T>
     assert ( data + dyn.size() - 1 == &*dyn.rbegin ());
     assert ( data + dyn.size() - 1 == &*dyn.crbegin ());
 
-    assert ( dyn.size () == std::distance ( dyn.begin(), dyn.end()));
-    assert ( dyn.size () == std::distance ( dyn.cbegin(), dyn.cend()));
-    assert ( dyn.size () == std::distance ( dyn.rbegin(), dyn.rend()));
-    assert ( dyn.size () == std::distance ( dyn.crbegin(), dyn.crend()));
+    std::ptrdiff_t ds = static_cast<std::ptrdiff_t>(dyn.size());
+    assert (ds == std::distance ( dyn.begin(), dyn.end()));
+    assert (ds == std::distance ( dyn.cbegin(), dyn.cend()));
+    assert (ds == std::distance ( dyn.rbegin(), dyn.rend()));
+    assert (ds == std::distance ( dyn.crbegin(), dyn.crend()));
 
     assert (   dyn.begin ()  ==   dyn.cbegin ());
     assert ( &*dyn.begin ()  == &*dyn.cbegin ());
@@ -68,10 +70,11 @@ void dyn_test ( dynarray<T> &dyn ) {
     assert ( data + dyn.size() - 1 == &*dyn.rbegin ());
     assert ( data + dyn.size() - 1 == &*dyn.crbegin ());
 
-    assert ( dyn.size () == std::distance ( dyn.begin(), dyn.end()));
-    assert ( dyn.size () == std::distance ( dyn.cbegin(), dyn.cend()));
-    assert ( dyn.size () == std::distance ( dyn.rbegin(), dyn.rend()));
-    assert ( dyn.size () == std::distance ( dyn.crbegin(), dyn.crend()));
+    std::ptrdiff_t ds = static_cast<std::ptrdiff_t>(dyn.size());
+    assert (ds == std::distance ( dyn.begin(), dyn.end()));
+    assert (ds == std::distance ( dyn.cbegin(), dyn.cend()));
+    assert (ds == std::distance ( dyn.rbegin(), dyn.rend()));
+    assert (ds == std::distance ( dyn.crbegin(), dyn.crend()));
 
     assert (   dyn.begin ()  ==   dyn.cbegin ());
     assert ( &*dyn.begin ()  == &*dyn.cbegin ());

Modified: libcxx/trunk/test/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/config.py?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/config.py (original)
+++ libcxx/trunk/test/libcxx/test/config.py Sat Dec 10 23:31:00 2016
@@ -656,12 +656,16 @@ class Configuration(object):
             self.cxx.addWarningFlagIfSupported('-Wno-pessimizing-move')
             self.cxx.addWarningFlagIfSupported('-Wno-c++11-extensions')
             self.cxx.addWarningFlagIfSupported('-Wno-user-defined-literals')
+            # These warnings should be enabled in order to support the MSVC
+            # team using the test suite; They enable the warnings below and
+            # expect the test suite to be clean.
+            self.cxx.addWarningFlagIfSupported('-Wsign-compare')
+            # FIXME: Enable the two warnings below.
+            self.cxx.addWarningFlagIfSupported('-Wno-unused-variable')
+            self.cxx.addWarningFlagIfSupported('-Wno-unused-parameter')
             # TODO(EricWF) Remove the unused warnings once the test suite
             # compiles clean with them.
-            self.cxx.addWarningFlagIfSupported('-Wno-sign-compare')
             self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef')
-            self.cxx.addWarningFlagIfSupported('-Wno-unused-variable')
-            self.cxx.addWarningFlagIfSupported('-Wno-unused-parameter')
             std = self.get_lit_conf('std', None)
             if std in ['c++98', 'c++03']:
                 # The '#define static_assert' provided by libc++ in C++03 mode

Modified: libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp Sat Dec 10 23:31:00 2016
@@ -15,64 +15,69 @@
 
 #include <algorithm>
 #include <functional>
+#include <cstddef>
 #include <cassert>
 
 #include "test_iterators.h"
 #include "counting_predicates.hpp"
 
-struct is_odd
-{
-    bool operator()(const int& i) const {return i & 1;}
+struct is_odd {
+  bool operator()(const int &i) const { return i & 1; }
 };
 
-int main()
-{
-    {
-        const int ia[] = {1, 2, 3, 4, 5, 6};
-        unary_counting_predicate<is_odd, int> pred((is_odd()));
-        assert(!std::is_partitioned(input_iterator<const int*>(std::begin(ia)),
-                                    input_iterator<const int*>(std::end(ia)),
-                                    std::ref(pred)));
-        assert(pred.count() <= std::distance(std::begin(ia), std::end(ia)));
-    }
-    {
-        const int ia[] = {1, 3, 5, 2, 4, 6};
-        unary_counting_predicate<is_odd, int> pred((is_odd()));
-        assert( std::is_partitioned(input_iterator<const int*>(std::begin(ia)),
-                                    input_iterator<const int*>(std::end(ia)),
-                                    std::ref(pred)));
-        assert(pred.count() <= std::distance(std::begin(ia), std::end(ia)));
-    }
-    {
-        const int ia[] = {2, 4, 6, 1, 3, 5};
-        unary_counting_predicate<is_odd, int> pred((is_odd()));
-        assert(!std::is_partitioned(input_iterator<const int*>(std::begin(ia)),
-                                    input_iterator<const int*>(std::end(ia)),
-                                    std::ref(pred)));
-        assert(pred.count() <= std::distance(std::begin(ia), std::end(ia)));
-    }
-    {
-        const int ia[] = {1, 3, 5, 2, 4, 6, 7};
-        unary_counting_predicate<is_odd, int> pred((is_odd()));
-        assert(!std::is_partitioned(input_iterator<const int*>(std::begin(ia)),
-                                    input_iterator<const int*>(std::end(ia)),
-                                    std::ref(pred)));
-        assert(pred.count() <= std::distance(std::begin(ia), std::end(ia)));
-    }
-    {
-        const int ia[] = {1, 3, 5, 2, 4, 6, 7};
-        unary_counting_predicate<is_odd, int> pred((is_odd()));
-        assert( std::is_partitioned(input_iterator<const int*>(std::begin(ia)),
-                                    input_iterator<const int*>(std::begin(ia)),
-                                    std::ref(pred)));
-        assert(pred.count() <= std::distance(std::begin(ia), std::begin(ia)));
-    }
-    {
-        const int ia[] = {1, 3, 5, 7, 9, 11, 2};
-        unary_counting_predicate<is_odd, int> pred((is_odd()));
-        assert( std::is_partitioned(input_iterator<const int*>(std::begin(ia)),
-                                    input_iterator<const int*>(std::end(ia)),
-                                    std::ref(pred)));
-        assert(pred.count() <= std::distance(std::begin(ia), std::end(ia)));
-    }
+int main() {
+  {
+    const int ia[] = {1, 2, 3, 4, 5, 6};
+    unary_counting_predicate<is_odd, int> pred((is_odd()));
+    assert(!std::is_partitioned(input_iterator<const int *>(std::begin(ia)),
+                                input_iterator<const int *>(std::end(ia)),
+                                std::ref(pred)));
+    assert(static_cast<std::ptrdiff_t>(pred.count()) <=
+           std::distance(std::begin(ia), std::end(ia)));
+  }
+  {
+    const int ia[] = {1, 3, 5, 2, 4, 6};
+    unary_counting_predicate<is_odd, int> pred((is_odd()));
+    assert(std::is_partitioned(input_iterator<const int *>(std::begin(ia)),
+                               input_iterator<const int *>(std::end(ia)),
+                               std::ref(pred)));
+    assert(static_cast<std::ptrdiff_t>(pred.count()) <=
+           std::distance(std::begin(ia), std::end(ia)));
+  }
+  {
+    const int ia[] = {2, 4, 6, 1, 3, 5};
+    unary_counting_predicate<is_odd, int> pred((is_odd()));
+    assert(!std::is_partitioned(input_iterator<const int *>(std::begin(ia)),
+                                input_iterator<const int *>(std::end(ia)),
+                                std::ref(pred)));
+    assert(static_cast<std::ptrdiff_t>(pred.count()) <=
+           std::distance(std::begin(ia), std::end(ia)));
+  }
+  {
+    const int ia[] = {1, 3, 5, 2, 4, 6, 7};
+    unary_counting_predicate<is_odd, int> pred((is_odd()));
+    assert(!std::is_partitioned(input_iterator<const int *>(std::begin(ia)),
+                                input_iterator<const int *>(std::end(ia)),
+                                std::ref(pred)));
+    assert(static_cast<std::ptrdiff_t>(pred.count()) <=
+           std::distance(std::begin(ia), std::end(ia)));
+  }
+  {
+    const int ia[] = {1, 3, 5, 2, 4, 6, 7};
+    unary_counting_predicate<is_odd, int> pred((is_odd()));
+    assert(std::is_partitioned(input_iterator<const int *>(std::begin(ia)),
+                               input_iterator<const int *>(std::begin(ia)),
+                               std::ref(pred)));
+    assert(static_cast<std::ptrdiff_t>(pred.count()) <=
+           std::distance(std::begin(ia), std::begin(ia)));
+  }
+  {
+    const int ia[] = {1, 3, 5, 7, 9, 11, 2};
+    unary_counting_predicate<is_odd, int> pred((is_odd()));
+    assert(std::is_partitioned(input_iterator<const int *>(std::begin(ia)),
+                               input_iterator<const int *>(std::end(ia)),
+                               std::ref(pred)));
+    assert(static_cast<std::ptrdiff_t>(pred.count()) <=
+           std::distance(std::begin(ia), std::end(ia)));
+  }
 }

Modified: libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp Sat Dec 10 23:31:00 2016
@@ -15,10 +15,9 @@
 
 #include <algorithm>
 #include <cassert>
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #include <memory>
-#endif
 
+#include "test_macros.h"
 #include "test_iterators.h"
 
 template <class Iter>
@@ -26,7 +25,7 @@ void
 test()
 {
     int ia[] = {0};
-    const unsigned sa = sizeof(ia)/sizeof(ia[0]);
+    const int sa = static_cast<int>(sizeof(ia)/sizeof(ia[0]));
     Iter r = std::rotate(Iter(ia), Iter(ia), Iter(ia));
     assert(base(r) == ia);
     assert(ia[0] == 0);
@@ -38,7 +37,7 @@ test()
     assert(ia[0] == 0);
 
     int ib[] = {0, 1};
-    const unsigned sb = sizeof(ib)/sizeof(ib[0]);
+    const int sb = static_cast<int>(sizeof(ib)/sizeof(ib[0]));
     r = std::rotate(Iter(ib), Iter(ib), Iter(ib+sb));
     assert(base(r) == ib+sb);
     assert(ib[0] == 0);
@@ -53,7 +52,7 @@ test()
     assert(ib[1] == 0);
 
     int ic[] = {0, 1, 2};
-    const unsigned sc = sizeof(ic)/sizeof(ic[0]);
+    const int sc = static_cast<int>(sizeof(ic)/sizeof(ic[0]));
     r = std::rotate(Iter(ic), Iter(ic), Iter(ic+sc));
     assert(base(r) == ic+sc);
     assert(ic[0] == 0);
@@ -76,7 +75,7 @@ test()
     assert(ic[2] == 2);
 
     int id[] = {0, 1, 2, 3};
-    const unsigned sd = sizeof(id)/sizeof(id[0]);
+    const int sd = static_cast<int>(sizeof(id)/sizeof(id[0]));
     r = std::rotate(Iter(id), Iter(id), Iter(id+sd));
     assert(base(r) == id+sd);
     assert(id[0] == 0);
@@ -109,7 +108,7 @@ test()
     assert(id[3] == 1);
 
     int ie[] = {0, 1, 2, 3, 4};
-    const unsigned se = sizeof(ie)/sizeof(ie[0]);
+    const int se = static_cast<int>(sizeof(ie)/sizeof(ie[0]));
     r = std::rotate(Iter(ie), Iter(ie), Iter(ie+se));
     assert(base(r) == ie+se);
     assert(ie[0] == 0);
@@ -154,7 +153,7 @@ test()
     assert(ie[4] == 4);
 
     int ig[] = {0, 1, 2, 3, 4, 5};
-    const unsigned sg = sizeof(ig)/sizeof(ig[0]);
+    const int sg = static_cast<int>(sizeof(ig)/sizeof(ig[0]));
     r = std::rotate(Iter(ig), Iter(ig), Iter(ig+sg));
     assert(base(r) == ig+sg);
     assert(ig[0] == 0);
@@ -213,14 +212,14 @@ test()
     assert(ig[5] == 2);
 }
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
 
 template <class Iter>
 void
 test1()
 {
     std::unique_ptr<int> ia[1];
-    const unsigned sa = sizeof(ia)/sizeof(ia[0]);
+    const int sa = static_cast<int>(sizeof(ia)/sizeof(ia[0]));
     for (int i = 0; i < sa; ++i)
         ia[i].reset(new int(i));
     Iter r = std::rotate(Iter(ia), Iter(ia), Iter(ia));
@@ -234,7 +233,7 @@ test1()
     assert(*ia[0] == 0);
 
     std::unique_ptr<int> ib[2];
-    const unsigned sb = sizeof(ib)/sizeof(ib[0]);
+    const int sb = static_cast<int>(sizeof(ib)/sizeof(ib[0]));
     for (int i = 0; i < sb; ++i)
         ib[i].reset(new int(i));
     r = std::rotate(Iter(ib), Iter(ib), Iter(ib+sb));
@@ -251,7 +250,7 @@ test1()
     assert(*ib[1] == 0);
 
     std::unique_ptr<int> ic[3];
-    const unsigned sc = sizeof(ic)/sizeof(ic[0]);
+    const int sc = static_cast<int>(sizeof(ic)/sizeof(ic[0]));
     for (int i = 0; i < sc; ++i)
         ic[i].reset(new int(i));
     r = std::rotate(Iter(ic), Iter(ic), Iter(ic+sc));
@@ -276,7 +275,7 @@ test1()
     assert(*ic[2] == 2);
 
     std::unique_ptr<int> id[4];
-    const unsigned sd = sizeof(id)/sizeof(id[0]);
+    const int sd = static_cast<int>(sizeof(id)/sizeof(id[0]));
     for (int i = 0; i < sd; ++i)
         id[i].reset(new int(i));
     r = std::rotate(Iter(id), Iter(id), Iter(id+sd));
@@ -311,7 +310,7 @@ test1()
     assert(*id[3] == 1);
 
     std::unique_ptr<int> ie[5];
-    const unsigned se = sizeof(ie)/sizeof(ie[0]);
+    const int se = static_cast<int>(sizeof(ie)/sizeof(ie[0]));
     for (int i = 0; i < se; ++i)
         ie[i].reset(new int(i));
     r = std::rotate(Iter(ie), Iter(ie), Iter(ie+se));
@@ -358,7 +357,7 @@ test1()
     assert(*ie[4] == 4);
 
     std::unique_ptr<int> ig[6];
-    const unsigned sg = sizeof(ig)/sizeof(ig[0]);
+    const int sg = static_cast<int>(sizeof(ig)/sizeof(ig[0]));
     for (int i = 0; i < sg; ++i)
         ig[i].reset(new int(i));
     r = std::rotate(Iter(ig), Iter(ig), Iter(ig+sg));
@@ -419,7 +418,7 @@ test1()
     assert(*ig[5] == 2);
 }
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif  // TEST_STD_VER >= 11
 
 int main()
 {
@@ -428,12 +427,12 @@ int main()
     test<random_access_iterator<int*> >();
     test<int*>();
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
 
     test1<forward_iterator<std::unique_ptr<int>*> >();
     test1<bidirectional_iterator<std::unique_ptr<int>*> >();
     test1<random_access_iterator<std::unique_ptr<int>*> >();
     test1<std::unique_ptr<int>*>();
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif
 }

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp Sat Dec 10 23:31:00 2016
@@ -35,7 +35,7 @@ void
 test()
 {
     const unsigned N = 1000;
-    const unsigned M = 10;
+    const int M = 10;
     std::vector<int> v(N);
     int x = 0;
     for (std::size_t i = 0; i < v.size(); ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp Sat Dec 10 23:31:00 2016
@@ -42,7 +42,7 @@ void
 test()
 {
     const unsigned N = 1000;
-    const unsigned M = 10;
+    const int M = 10;
     std::vector<int> v(N);
     int x = 0;
     for (std::size_t i = 0; i < v.size(); ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp Sat Dec 10 23:31:00 2016
@@ -43,7 +43,7 @@ void
 test()
 {
     const unsigned N = 1000;
-    const unsigned M = 10;
+    const int M = 10;
     std::vector<int> v(N);
     int x = 0;
     for (std::size_t i = 0; i < v.size(); ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp Sat Dec 10 23:31:00 2016
@@ -37,7 +37,7 @@ void
 test()
 {
     const unsigned N = 1000;
-    const unsigned M = 10;
+    const int M = 10;
     std::vector<int> v(N);
     int x = 0;
     for (std::size_t i = 0; i < v.size(); ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp Sat Dec 10 23:31:00 2016
@@ -38,7 +38,7 @@ void
 test()
 {
     const unsigned N = 1000;
-    const unsigned M = 10;
+    const int M = 10;
     std::vector<int> v(N);
     int x = 0;
     for (std::size_t i = 0; i < v.size(); ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp Sat Dec 10 23:31:00 2016
@@ -37,7 +37,7 @@ void
 test()
 {
     const unsigned N = 1000;
-    const unsigned M = 10;
+    const int M = 10;
     std::vector<int> v(N);
     int x = 0;
     for (std::size_t i = 0; i < v.size(); ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp Sat Dec 10 23:31:00 2016
@@ -38,7 +38,7 @@ void
 test()
 {
     const unsigned N = 1000;
-    const unsigned M = 10;
+    const int M = 10;
     std::vector<int> v(N);
     int x = 0;
     for (std::size_t i = 0; i < v.size(); ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp Sat Dec 10 23:31:00 2016
@@ -16,13 +16,12 @@
 
 #include <algorithm>
 #include <functional>
+#include <memory>
 #include <cassert>
 
+#include "test_macros.h"
 #include "counting_predicates.hpp"
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#include <memory>
-
 struct indirect_less
 {
     template <class P>
@@ -30,9 +29,8 @@ struct indirect_less
         {return *x < *y;}
 };
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-void test(unsigned N)
+void test(int N)
 {
     int* ia = new int [N];
     {
@@ -49,7 +47,7 @@ void test(unsigned N)
     for (int i = 0; i < N; ++i)
         ia[i] = i;
     std::make_heap(ia, ia+N, std::ref(pred));
-    assert(pred.count() <= 3*N);
+    assert(pred.count() <= 3u*N);
     assert(std::is_heap(ia, ia+N, pred));
     }
 
@@ -59,7 +57,7 @@ void test(unsigned N)
     for (int i = 0; i < N; ++i)
         ia[N-1-i] = i;
     std::make_heap(ia, ia+N, std::ref(pred));
-    assert(pred.count() <= 3*N);
+    assert(pred.count() <= 3u*N);
     assert(std::is_heap(ia, ia+N, pred));
     }
 
@@ -68,7 +66,7 @@ void test(unsigned N)
     binary_counting_predicate<std::greater<int>, int, int> pred ((std::greater<int>()));
     std::random_shuffle(ia, ia+N);
     std::make_heap(ia, ia+N, std::ref(pred));
-    assert(pred.count() <= 3*N);
+    assert(pred.count() <= 3u*N);
     assert(std::is_heap(ia, ia+N, pred));
     }
 
@@ -86,7 +84,7 @@ int main()
     test(10000);
     test(100000);
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
     {
     const int N = 1000;
     std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
@@ -97,5 +95,5 @@ int main()
     assert(std::is_heap(ia, ia+N, indirect_less()));
     delete [] ia;
     }
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif
 }

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp Sat Dec 10 23:31:00 2016
@@ -74,7 +74,7 @@ test_one(unsigned N, unsigned M)
     std::inplace_merge(Iter(ia), Iter(ia+M), Iter(ia+N), std::ref(pred));
     if(N > 0)
     {
-        assert(ia[0] == N-1);
+        assert(ia[0] == static_cast<int>(N)-1);
         assert(ia[N-1] == 0);
         assert(std::is_sorted(ia, ia+N, std::greater<value_type>()));
         assert(pred.count() <= (N-1));
@@ -125,10 +125,10 @@ int main()
     test<S*>();
 
     {
-    unsigned N = 100;
+    int N = 100;
     unsigned M = 50;
     std::unique_ptr<int>* ia = new std::unique_ptr<int>[N];
-    for (unsigned i = 0; i < N; ++i)
+    for (int i = 0; i < N; ++i)
         ia[i].reset(new int(i));
     std::random_shuffle(ia, ia+N);
     std::sort(ia, ia+M, indirect_less());

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element_comp.pass.cpp Sat Dec 10 23:31:00 2016
@@ -18,6 +18,7 @@
 #include <functional>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_iterators.h"
 
 template <class Iter>
@@ -66,7 +67,7 @@ void test_eq0(Iter first, Iter last, Pre
 
 void test_eq()
 {
-    const size_t N = 10;
+    const int N = 10;
     int* a = new int[N];
     for (int i = 0; i < N; ++i)
         a[i] = 10; // all the same

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp Sat Dec 10 23:31:00 2016
@@ -18,6 +18,7 @@
 #include <functional>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_iterators.h"
 
 template <class Iter>
@@ -66,7 +67,7 @@ void test_eq0(Iter first, Iter last, Pre
 
 void test_eq()
 {
-    const size_t N = 10;
+    const int N = 10;
     int* a = new int[N];
     for (int i = 0; i < N; ++i)
         a[i] = 10; // all the same

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp Sat Dec 10 23:31:00 2016
@@ -62,7 +62,7 @@ test()
     test<Iter>(10);
     test<Iter>(1000);
     {
-    const unsigned N = 100;
+    const int N = 100;
     int* a = new int[N];
     for (int i = 0; i < N; ++i)
         a[i] = 5;

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/minmax_element_comp.pass.cpp Sat Dec 10 23:31:00 2016
@@ -18,6 +18,7 @@
 #include <functional>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_iterators.h"
 
 template <class Iter>
@@ -65,7 +66,7 @@ test()
     test<Iter>(10);
     test<Iter>(1000);
     {
-    const unsigned N = 100;
+    const int N = 100;
     int* a = new int[N];
     for (int i = 0; i < N; ++i)
         a[i] = 5;

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp Sat Dec 10 23:31:00 2016
@@ -63,7 +63,7 @@ test_sort_driver(RI f, RI l, int start)
     test_sort_driver_driver(f, l, start, l);
 }
 
-template <unsigned sa>
+template <int sa>
 void
 test_sort_()
 {

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp Sat Dec 10 23:31:00 2016
@@ -63,7 +63,7 @@ test_sort_driver(RI f, RI l, int start)
     test_sort_driver_driver(f, l, start, l);
 }
 
-template <unsigned sa>
+template <int sa>
 void
 test_sort_()
 {

Modified: libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp Sat Dec 10 23:31:00 2016
@@ -14,8 +14,10 @@
 // template <class... Args> reference emplace_back(Args&&... args);
 
 #include <deque>
+#include <cstddef>
 #include <cassert>
 
+#include "test_macros.h"
 #include "../../../Emplaceable.h"
 #include "min_allocator.h"
 #include "test_allocator.h"
@@ -51,7 +53,8 @@ test(C& c1)
     std::size_t c1_osize = c1.size();
     Ref ref = c1.emplace_back(Emplaceable(1, 2.5));
     assert(c1.size() == c1_osize + 1);
-    assert(distance(c1.begin(), c1.end()) == c1.size());
+    assert(distance(c1.begin(), c1.end())
+               == static_cast<std::ptrdiff_t>(c1.size()));
     I i = c1.end();
     assert(*--i == Emplaceable(1, 2.5));
     assert(&(*i) == &ref);

Modified: libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp Sat Dec 10 23:31:00 2016
@@ -14,8 +14,10 @@
 // template <class... Args> reference emplace_front(Args&&... args);
 
 #include <deque>
+#include <cstddef>
 #include <cassert>
 
+#include "test_macros.h"
 #include "../../../Emplaceable.h"
 #include "min_allocator.h"
 
@@ -50,7 +52,8 @@ test(C& c1)
     std::size_t c1_osize = c1.size();
     Ref res_ref = c1.emplace_front(Emplaceable(1, 2.5));
     assert(c1.size() == c1_osize + 1);
-    assert(distance(c1.begin(), c1.end()) == c1.size());
+    assert(distance(c1.begin(), c1.end())
+               == static_cast<std::ptrdiff_t>(c1.size()));
     I i = c1.begin();
     assert(*i == Emplaceable(1, 2.5));
     assert(&res_ref == &(*i));

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/insert_iter_iter_iter.pass.cpp Sat Dec 10 23:31:00 2016
@@ -16,6 +16,8 @@
 #include <vector>
 #include <cassert>
 #include <cstddef>
+
+#include "test_macros.h"
 #include "test_iterators.h"
 #include "min_allocator.h"
 
@@ -32,7 +34,7 @@ int main()
         std::size_t j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < v.size(); ++j)
             assert(v[j] == 0);
@@ -48,7 +50,7 @@ int main()
         int j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < 105; ++j)
             assert(v[j] == 0);
@@ -66,7 +68,7 @@ int main()
         std::size_t j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < v.size(); ++j)
             assert(v[j] == 0);
@@ -85,7 +87,7 @@ int main()
         std::size_t j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < v.size(); ++j)
             assert(v[j] == 0);
@@ -102,7 +104,7 @@ int main()
         std::size_t j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < v.size(); ++j)
             assert(v[j] == 0);
@@ -118,7 +120,7 @@ int main()
         std::size_t j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < v.size(); ++j)
             assert(v[j] == 0);

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp Sat Dec 10 23:31:00 2016
@@ -19,6 +19,7 @@
 #include <vector>
 #include <cassert>
 #include <cstddef>
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "test_iterators.h"
 #include "min_allocator.h"
@@ -38,7 +39,7 @@ int main()
         int j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < 105; ++j)
             assert(v[j] == 0);
@@ -55,7 +56,7 @@ int main()
         int j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < 105; ++j)
             assert(v[j] == 0);
@@ -73,7 +74,7 @@ int main()
         std::size_t j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < v.size(); ++j)
             assert(v[j] == 0);
@@ -91,7 +92,7 @@ int main()
         std::size_t j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < v.size(); ++j)
             assert(v[j] == 0);
@@ -108,7 +109,7 @@ int main()
         int j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < 105; ++j)
             assert(v[j] == 0);
@@ -125,7 +126,7 @@ int main()
         int j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < 105; ++j)
             assert(v[j] == 0);
@@ -154,7 +155,7 @@ int main()
         int j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < 105; ++j)
             assert(v[j] == 0);
@@ -171,7 +172,7 @@ int main()
         int j;
         for (j = 0; j < 10; ++j)
             assert(v[j] == 0);
-        for (int k = 0; k < N; ++j, ++k)
+        for (std::size_t k = 0; k < N; ++j, ++k)
             assert(v[j] == a[k]);
         for (; j < 105; ++j)
             assert(v[j] == 0);

Modified: libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp (original)
+++ libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp Sat Dec 10 23:31:00 2016
@@ -23,7 +23,7 @@
 #include "test_macros.h"
 
 void
-test(int i)
+test(std::size_t i)
 {
     typedef std::error_code T;
     typedef std::hash<T> H;

Modified: libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp (original)
+++ libcxx/trunk/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp Sat Dec 10 23:31:00 2016
@@ -23,7 +23,7 @@
 #include "test_macros.h"
 
 void
-test(int i)
+test(std::size_t i)
 {
     typedef std::error_condition T;
     typedef std::hash<T> H;

Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.copy/copy.pass.cpp Sat Dec 10 23:31:00 2016
@@ -19,6 +19,7 @@
 
 #include <experimental/filesystem>
 #include <type_traits>
+#include <cstddef>
 #include <cassert>
 
 #include "test_macros.h"
@@ -196,7 +197,7 @@ TEST_CASE(from_is_directory)
 {
     struct FileInfo {
         path filename;
-        int size;
+        std::size_t size;
     };
     const FileInfo files[] = {
         {"file1", 0},

Modified: libcxx/trunk/test/std/experimental/string.view/string.view.iterators/end.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/string.view/string.view.iterators/end.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/string.view/string.view.iterators/end.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/string.view/string.view.iterators/end.pass.cpp Sat Dec 10 23:31:00 2016
@@ -12,6 +12,7 @@
 // constexpr const_iterator end() const;
 
 #include <experimental/string_view>
+#include <cstddef>
 #include <cassert>
 
 #include "test_macros.h"
@@ -38,9 +39,9 @@ test(S s)
         assert(ce2 !=  s.begin());
     }
 
-    assert(  e -  s.begin() == s.size());
-    assert(ce1 - cs.begin() == cs.size());
-    assert(ce2 - s.cbegin() == s.size());
+    assert(  e -  s.begin() == static_cast<std::ptrdiff_t>(s.size()));
+    assert(ce1 - cs.begin() == static_cast<std::ptrdiff_t>(cs.size()));
+    assert(ce2 - s.cbegin() == static_cast<std::ptrdiff_t>(s.size()));
 
     assert(  e == ce1);
     assert(  e == ce2);

Modified: libcxx/trunk/test/std/experimental/string.view/string.view.iterators/rend.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/string.view/string.view.iterators/rend.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/string.view/string.view.iterators/rend.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/string.view/string.view.iterators/rend.pass.cpp Sat Dec 10 23:31:00 2016
@@ -12,6 +12,7 @@
 // constexpr const_iterator rend() const;
 
 #include <experimental/string_view>
+#include <cstddef>
 #include <cassert>
 
 #include "test_macros.h"
@@ -38,9 +39,9 @@ test(S s)
         assert(ce2 !=  s.rbegin());
     }
 
-    assert(  e -  s.rbegin() == s.size());
-    assert(ce1 - cs.rbegin() == cs.size());
-    assert(ce2 - s.crbegin() == s.size());
+    assert(  e -  s.rbegin() == static_cast<std::ptrdiff_t>(s.size()));
+    assert(ce1 - cs.rbegin() == static_cast<std::ptrdiff_t>(cs.size()));
+    assert(ce2 - s.crbegin() == static_cast<std::ptrdiff_t>(s.size()));
 
     assert(  e == ce1);
     assert(  e == ce2);

Modified: libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp Sat Dec 10 23:31:00 2016
@@ -16,6 +16,7 @@
 // This test is not entirely portable
 
 #include <fstream>
+#include <cstddef>
 #include <cassert>
 
 #include "platform_support.h" // locale name macros
@@ -118,6 +119,6 @@ int main()
         assert(f.sbumpc() == 0x4E51);
         assert(f.sbumpc() == 0x4E52);
         assert(f.sbumpc() == 0x4E53);
-        assert(f.sbumpc() == -1);
+        assert(f.sbumpc() == static_cast<unsigned>(-1));
     }
 }

Modified: libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp Sat Dec 10 23:31:00 2016
@@ -36,5 +36,5 @@ int main()
     assert(from_next - from == 9);
     assert(to_next - to == 9);
     for (unsigned i = 0; i < 9; ++i)
-        assert(to[i] == from[i]);
+        assert(to[i] == static_cast<char32_t>(from[i]));
 }

Modified: libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp Sat Dec 10 23:31:00 2016
@@ -40,6 +40,6 @@ int main()
         assert(from_next - from == 9);
         assert(to_next - to == 9);
         for (unsigned i = 0; i < 9; ++i)
-            assert(to[i] == from[i]);
+            assert(static_cast<char32_t>(to[i]) == from[i]);
     }
 }

Modified: libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_long.pass.cpp Sat Dec 10 23:31:00 2016
@@ -100,6 +100,7 @@ int main()
                   ios, err, v);
         assert(iter.base() == str+sizeof(str)-1);
         assert(err == ios.goodbit);
-        assert(v == 0x8000000000000000LL);
+        const long long expect = 0x8000000000000000LL;
+        assert(v == expect);
     }
 }

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/access.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/access.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/access.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/access.pass.cpp Sat Dec 10 23:31:00 2016
@@ -23,11 +23,11 @@ int main()
         T a[] = {5, 4, 3, 2, 1};
         const unsigned N = sizeof(a)/sizeof(a[0]);
         std::valarray<T> v(a, N);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v[i] == a[i]);
             v[i] = i;
-            assert(v[i] == i);
+            assert(v[i] == static_cast<int>(i));
         }
     }
 }

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/const_access.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/const_access.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/const_access.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.access/const_access.pass.cpp Sat Dec 10 23:31:00 2016
@@ -23,7 +23,7 @@ int main()
         T a[] = {5, 4, 3, 2, 1};
         const unsigned N = sizeof(a)/sizeof(a[0]);
         const std::valarray<T> v(a, N);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v[i] == a[i]);
         }

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp Sat Dec 10 23:31:00 2016
@@ -49,7 +49,7 @@ int main()
         std::valarray<T> v2(a, N-2);
         v2 = v;
         assert(v2.size() == v.size());
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v2[i].size() == v[i].size());
             for (std::size_t j = 0; j < v[i].size(); ++j)

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp Sat Dec 10 23:31:00 2016
@@ -47,7 +47,7 @@ int main()
         std::valarray<T> v2(a, N-2);
         v2 = {T(1), T(2), T(3), T(4), T(5)};
         assert(v2.size() == N);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v2[i].size() == a[i].size());
             for (std::size_t j = 0; j < a[i].size(); ++j)

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp Sat Dec 10 23:31:00 2016
@@ -53,7 +53,7 @@ int main()
         v2 = std::move(v);
         assert(v2.size() == N);
         assert(v.size() == 0);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v2[i].size() == a[i].size());
             for (std::size_t j = 0; j < a[i].size(); ++j)

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp Sat Dec 10 23:31:00 2016
@@ -46,7 +46,7 @@ int main()
         std::valarray<T> v(a, N);
         std::valarray<T> v2 = v;
         assert(v2.size() == v.size());
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v2[i].size() == v[i].size());
             for (std::size_t j = 0; j < v[i].size(); ++j)

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp Sat Dec 10 23:31:00 2016
@@ -25,7 +25,7 @@ int main()
         const unsigned N = sizeof(a)/sizeof(a[0]);
         std::valarray<T> v = {1, 2, 3, 4, 5};
         assert(v.size() == N);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
             assert(v[i] == a[i]);
     }
     {
@@ -34,7 +34,7 @@ int main()
         const unsigned N = sizeof(a)/sizeof(a[0]);
         std::valarray<T> v = {1, 2, 3, 4, 5};
         assert(v.size() == N);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
             assert(v[i] == a[i]);
     }
 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp Sat Dec 10 23:31:00 2016
@@ -51,7 +51,7 @@ int main()
         std::valarray<T> v2 = std::move(v);
         assert(v2.size() == N);
         assert(v.size() == 0);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v2[i].size() == a[i].size());
             for (std::size_t j = 0; j < v2[i].size(); ++j)

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp Sat Dec 10 23:31:00 2016
@@ -25,7 +25,7 @@ int main()
         const unsigned N = sizeof(a)/sizeof(a[0]);
         std::valarray<T> v(a, N);
         assert(v.size() == N);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
             assert(v[i] == a[i]);
     }
     {
@@ -34,7 +34,7 @@ int main()
         const unsigned N = sizeof(a)/sizeof(a[0]);
         std::valarray<T> v(a, N);
         assert(v.size() == N);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
             assert(v[i] == a[i]);
     }
     {
@@ -43,7 +43,7 @@ int main()
         const unsigned N = sizeof(a)/sizeof(a[0]);
         std::valarray<T> v(a, N);
         assert(v.size() == N);
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v[i].size() == a[i].size());
             for (std::size_t j = 0; j < v[i].size(); ++j)

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp Sat Dec 10 23:31:00 2016
@@ -36,7 +36,7 @@ int main()
         std::valarray<T> v(a, N);
         std::valarray<T> v2 = ~v;
         assert(v2.size() == v.size());
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v2[i].size() == v[i].size());
             for (std::size_t j = 0; j < v[i].size(); ++j)

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp Sat Dec 10 23:31:00 2016
@@ -46,7 +46,7 @@ int main()
         std::valarray<T> v(a, N);
         std::valarray<T> v2 = -v;
         assert(v2.size() == v.size());
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v2[i].size() == v[i].size());
             for (std::size_t j = 0; j < v[i].size(); ++j)

Modified: libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp Sat Dec 10 23:31:00 2016
@@ -46,7 +46,7 @@ int main()
         std::valarray<T> v(a, N);
         std::valarray<T> v2 = +v;
         assert(v2.size() == v.size());
-        for (int i = 0; i < N; ++i)
+        for (unsigned i = 0; i < N; ++i)
         {
             assert(v2[i].size() == v[i].size());
             for (std::size_t j = 0; j < v[i].size(); ++j)

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -49,7 +49,7 @@ test1()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -92,7 +92,7 @@ test2()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -135,7 +135,7 @@ test3()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -178,7 +178,7 @@ test4()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -227,7 +227,7 @@ test5()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -276,7 +276,7 @@ test6()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -319,7 +319,7 @@ test7()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -352,8 +352,12 @@ test8()
     std::binomial_distribution<>         dist1(5, 0.1);
     std::binomial_distribution<unsigned> dist2(5, 0.1);
 
-    for(int i = 0; i < N; ++i)
-        assert(dist1(gen1) == dist2(gen2));
+    for(int i = 0; i < N; ++i) {
+        int r1 = dist1(gen1);
+        unsigned r2 = dist2(gen2);
+        assert(r1 >= 0);
+        assert(static_cast<unsigned>(r1) == r2);
+    }
 }
 
 void
@@ -376,7 +380,7 @@ test9()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -425,7 +429,7 @@ test10()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -474,7 +478,7 @@ test11()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -51,7 +51,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -93,7 +93,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -135,7 +135,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -49,7 +49,7 @@ test1()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -92,7 +92,7 @@ test2()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -135,7 +135,7 @@ test3()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -178,7 +178,7 @@ test4()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -221,7 +221,7 @@ test5()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -264,7 +264,7 @@ test6()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -51,7 +51,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -93,7 +93,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -135,7 +135,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -49,7 +49,7 @@ test1()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -92,7 +92,7 @@ test2()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -135,7 +135,7 @@ test3()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -178,7 +178,7 @@ test4()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -219,7 +219,7 @@ test5()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -262,7 +262,7 @@ test6()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -51,7 +51,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -93,7 +93,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -135,7 +135,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -49,7 +49,7 @@ test1()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -94,7 +94,7 @@ test2()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -139,7 +139,7 @@ test3()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -184,7 +184,7 @@ test4()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -229,7 +229,7 @@ test5()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -50,7 +50,7 @@ test1()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -96,7 +96,7 @@ test2()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -142,7 +142,7 @@ test3()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -188,7 +188,7 @@ test4()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -234,7 +234,7 @@ test5()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -45,7 +45,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -81,7 +81,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -117,7 +117,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -46,7 +46,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -83,7 +83,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -120,7 +120,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -48,7 +48,7 @@ test1()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -90,7 +90,7 @@ test2()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -132,7 +132,7 @@ test3()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -174,7 +174,7 @@ test4()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -49,7 +49,7 @@ test1()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -92,7 +92,7 @@ test2()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -135,7 +135,7 @@ test3()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);
@@ -178,7 +178,7 @@ test4()
     double var = 0;
     double skew = 0;
     double kurtosis = 0;
-    for (int i = 0; i < u.size(); ++i)
+    for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
         double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -49,7 +49,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -89,7 +89,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -129,7 +129,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -50,7 +50,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -91,7 +91,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -132,7 +132,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -48,7 +48,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -87,7 +87,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -126,7 +126,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -50,7 +50,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -91,7 +91,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);
@@ -132,7 +132,7 @@ int main()
         double var = 0;
         double skew = 0;
         double kurtosis = 0;
-        for (int i = 0; i < u.size(); ++i)
+        for (unsigned i = 0; i < u.size(); ++i)
         {
             double dbl = (u[i] - mean);
             double d2 = sqr(dbl);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -51,10 +51,10 @@ test1()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -114,10 +114,10 @@ test2()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -177,10 +177,10 @@ test3()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -240,10 +240,10 @@ test4()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -303,10 +303,10 @@ test5()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -366,10 +366,10 @@ test6()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -429,10 +429,10 @@ test7()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -492,10 +492,10 @@ test8()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -555,10 +555,10 @@ test9()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -618,10 +618,10 @@ test10()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);
@@ -681,10 +681,10 @@ test11()
     }
     std::vector<double> prob(std::begin(p), std::end(p));
     double s = std::accumulate(prob.begin(), prob.end(), 0.0);
-    for (int i = 0; i < prob.size(); ++i)
+    for (std::size_t i = 0; i < prob.size(); ++i)
         prob[i] /= s;
     std::sort(u.begin(), u.end());
-    for (int i = 0; i < Np; ++i)
+    for (std::size_t i = 0; i < Np; ++i)
     {
         typedef std::vector<D::result_type>::iterator I;
         I lb = std::lower_bound(u.begin(), u.end(), b[i]);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -57,7 +57,7 @@ int main()
         for (std::size_t i = 0; i < prob.size(); ++i)
             prob[i] /= s;
         std::sort(u.begin(), u.end());
-        for (int i = 0; i < Np; ++i)
+        for (std::size_t i = 0; i < Np; ++i)
         {
             typedef std::vector<D::result_type>::iterator I;
             I lb = std::lower_bound(u.begin(), u.end(), b[i]);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp Sat Dec 10 23:31:00 2016
@@ -53,7 +53,7 @@ test1()
     D d(b, b+Np+1, p);
     const int N = 1000000;
     std::vector<D::result_type> u;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         D::result_type v = d(g);
         assert(d.min() <= v && v < d.max());
@@ -67,16 +67,16 @@ test1()
     double c = std::numeric_limits<double>::quiet_NaN();
     std::vector<double> areas(Np);
     double S = 0;
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
     {
         areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2;
         S += areas[i];
     }
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
         areas[i] /= S;
-    for (int i = 0; i < Np+1; ++i)
+    for (size_t i = 0; i < Np+1; ++i)
         p[i] /= S;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1;
         if (k != kp)
@@ -106,7 +106,7 @@ test2()
     D d(b, b+Np+1, p);
     const int N = 1000000;
     std::vector<D::result_type> u;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         D::result_type v = d(g);
         assert(d.min() <= v && v < d.max());
@@ -120,16 +120,16 @@ test2()
     double c = std::numeric_limits<double>::quiet_NaN();
     std::vector<double> areas(Np);
     double S = 0;
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
     {
         areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2;
         S += areas[i];
     }
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
         areas[i] /= S;
-    for (int i = 0; i < Np+1; ++i)
+    for (size_t i = 0; i < Np+1; ++i)
         p[i] /= S;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1;
         if (k != kp)
@@ -157,9 +157,9 @@ test3()
     double p[] = {1, 0, 0, 0};
     const size_t Np = sizeof(p) / sizeof(p[0]) - 1;
     D d(b, b+Np+1, p);
-    const int N = 1000000;
+    const size_t N = 1000000;
     std::vector<D::result_type> u;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         D::result_type v = d(g);
         assert(d.min() <= v && v < d.max());
@@ -173,16 +173,16 @@ test3()
     double c = std::numeric_limits<double>::quiet_NaN();
     std::vector<double> areas(Np);
     double S = 0;
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
     {
         areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2;
         S += areas[i];
     }
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
         areas[i] /= S;
-    for (int i = 0; i < Np+1; ++i)
+    for (size_t i = 0; i < Np+1; ++i)
         p[i] /= S;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1;
         if (k != kp)
@@ -212,7 +212,7 @@ test4()
     D d(b, b+Np+1, p);
     const int N = 1000000;
     std::vector<D::result_type> u;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         D::result_type v = d(g);
         assert(d.min() <= v && v < d.max());
@@ -226,16 +226,16 @@ test4()
     double c = std::numeric_limits<double>::quiet_NaN();
     std::vector<double> areas(Np);
     double S = 0;
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
     {
         areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2;
         S += areas[i];
     }
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
         areas[i] /= S;
-    for (int i = 0; i < Np+1; ++i)
+    for (size_t i = 0; i < Np+1; ++i)
         p[i] /= S;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1;
         if (k != kp)
@@ -243,7 +243,7 @@ test4()
             a = 0;
             for (int j = 0; j < k; ++j)
                 a += areas[j];
-            assert(k < Np);
+            assert(k < static_cast<int>(Np));
             m = (p[k+1] - p[k]) / (b[k+1] - b[k]);
             bk = b[k];
             c = (b[k+1]*p[k] - b[k]*p[k+1]) / (b[k+1] - b[k]);
@@ -266,7 +266,7 @@ test5()
     D d(b, b+Np+1, p);
     const int N = 1000000;
     std::vector<D::result_type> u;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         D::result_type v = d(g);
         assert(d.min() <= v && v < d.max());
@@ -280,17 +280,17 @@ test5()
     double c = std::numeric_limits<double>::quiet_NaN();
     std::vector<double> areas(Np);
     double S = 0;
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
     {
         assert(i < Np);
         areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2;
         S += areas[i];
     }
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
         areas[i] /= S;
-    for (int i = 0; i < Np+1; ++i)
+    for (size_t i = 0; i < Np+1; ++i)
         p[i] /= S;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1;
         if (k != kp)
@@ -298,7 +298,7 @@ test5()
             a = 0;
             for (int j = 0; j < k; ++j)
                 a += areas[j];
-            assert(k < Np);
+            assert(k < static_cast<int>(Np));
             m = (p[k+1] - p[k]) / (b[k+1] - b[k]);
             bk = b[k];
             c = (b[k+1]*p[k] - b[k]*p[k+1]) / (b[k+1] - b[k]);
@@ -321,7 +321,7 @@ test6()
     D d(b, b+Np+1, p);
     const int N = 1000000;
     std::vector<D::result_type> u;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         D::result_type v = d(g);
         assert(d.min() <= v && v < d.max());
@@ -335,16 +335,16 @@ test6()
     double c = std::numeric_limits<double>::quiet_NaN();
     std::vector<double> areas(Np);
     double S = 0;
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
     {
         areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2;
         S += areas[i];
     }
-    for (int i = 0; i < areas.size(); ++i)
+    for (size_t i = 0; i < areas.size(); ++i)
         areas[i] /= S;
-    for (int i = 0; i < Np+1; ++i)
+    for (size_t i = 0; i < Np+1; ++i)
         p[i] /= S;
-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
         int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1;
         if (k != kp)

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp Sat Dec 10 23:31:00 2016
@@ -50,9 +50,9 @@ int main()
         const size_t Np = sizeof(p) / sizeof(p[0]) - 1;
         D d;
         P pa(b, b+Np+1, p);
-        const int N = 1000000;
+        const size_t N = 1000000;
         std::vector<D::result_type> u;
-        for (int i = 0; i < N; ++i)
+        for (size_t i = 0; i < N; ++i)
         {
             D::result_type v = d(g, pa);
             assert(10 <= v && v < 17);
@@ -66,16 +66,16 @@ int main()
         double c = std::numeric_limits<double>::quiet_NaN();
         std::vector<double> areas(Np);
         double S = 0;
-        for (int i = 0; i < areas.size(); ++i)
+        for (size_t i = 0; i < areas.size(); ++i)
         {
             areas[i] = (p[i]+p[i+1])*(b[i+1]-b[i])/2;
             S += areas[i];
         }
-        for (int i = 0; i < areas.size(); ++i)
+        for (size_t i = 0; i < areas.size(); ++i)
             areas[i] /= S;
-        for (int i = 0; i < Np+1; ++i)
+        for (size_t i = 0; i < Np+1; ++i)
             p[i] /= S;
-        for (int i = 0; i < N; ++i)
+        for (size_t i = 0; i < N; ++i)
         {
             int k = std::lower_bound(b, b+Np+1, u[i]) - b - 1;
             if (k != kp)

Modified: libcxx/trunk/test/std/utilities/function.objects/comparisons/pointer_comparison_test_helper.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/pointer_comparison_test_helper.hpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/comparisons/pointer_comparison_test_helper.hpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/comparisons/pointer_comparison_test_helper.hpp Sat Dec 10 23:31:00 2016
@@ -19,13 +19,13 @@ void do_pointer_comparison_test() {
 #endif
     std::vector<std::shared_ptr<T> > pointers;
     const std::size_t test_size = 100;
-    for (int i=0; i < test_size; ++i)
+    for (size_t i=0; i < test_size; ++i)
         pointers.push_back(std::shared_ptr<T>(new T()));
     Compare comp;
     UIntCompare ucomp;
     VoidCompare vcomp;
-    for (int i=0; i < test_size; ++i) {
-        for (int j=0; j < test_size; ++j) {
+    for (size_t i=0; i < test_size; ++i) {
+        for (size_t j=0; j < test_size; ++j) {
             T* lhs = pointers[i].get();
             T* rhs = pointers[j].get();
             std::uintptr_t lhs_uint = reinterpret_cast<std::uintptr_t>(lhs);

Modified: libcxx/trunk/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/unord.hash/integral.pass.cpp?rev=289363&r1=289362&r2=289363&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/unord.hash/integral.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/unord.hash/integral.pass.cpp Sat Dec 10 23:31:00 2016
@@ -39,7 +39,7 @@ test()
         if (sizeof(T) <= sizeof(std::size_t))
         {
             const std::size_t result = h(t);
-            LIBCPP_ASSERT(result == t);
+            LIBCPP_ASSERT(result == static_cast<size_t>(t));
             ((void)result); // Prevent unused warning
         }
     }




More information about the cfe-commits mailing list