[libcxx] r287823 - [libcxx] [test] D27015: Fix MSVC warning C4018 "signed/unsigned mismatch", part 3/12.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 23 14:02:16 PST 2016


Author: stl_msft
Date: Wed Nov 23 16:02:16 2016
New Revision: 287823

URL: http://llvm.org/viewvc/llvm-project?rev=287823&view=rev
Log:
[libcxx] [test] D27015: Fix MSVC warning C4018 "signed/unsigned mismatch", part 3/12.

Change unsigned to int in parameters.

Modified:
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element.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.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.nth.element/nth_element.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_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

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap.pass.cpp Wed Nov 23 16:02:16 2016
@@ -17,7 +17,7 @@
 #include <algorithm>
 #include <cassert>
 
-void test(unsigned N)
+void test(int N)
 {
     int* ia = new int [N];
     for (int i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap.pass.cpp Wed Nov 23 16:02:16 2016
@@ -17,7 +17,7 @@
 #include <algorithm>
 #include <cassert>
 
-void test(unsigned N)
+void test(int N)
 {
     int* ia = new int [N];
     for (int i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp Wed Nov 23 16:02:16 2016
@@ -29,7 +29,7 @@ struct indirect_less
 
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-void test(unsigned N)
+void test(int N)
 {
     int* ia = new int [N];
     for (int i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap.pass.cpp Wed Nov 23 16:02:16 2016
@@ -18,7 +18,7 @@
 #include <algorithm>
 #include <cassert>
 
-void test(unsigned N)
+void test(int N)
 {
     int* ia = new int [N];
     for (int i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp Wed Nov 23 16:02:16 2016
@@ -30,7 +30,7 @@ struct indirect_less
 
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-void test(unsigned N)
+void test(int N)
 {
     int* ia = new int [N];
     for (int i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap.pass.cpp Wed Nov 23 16:02:16 2016
@@ -17,7 +17,7 @@
 #include <algorithm>
 #include <cassert>
 
-void test(unsigned N)
+void test(int N)
 {
     int* ia = new int [N];
     for (int i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp Wed Nov 23 16:02:16 2016
@@ -29,7 +29,7 @@ struct indirect_less
 
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
-void test(unsigned N)
+void test(int N)
 {
     int* ia = new int [N];
     for (int i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/max_element.pass.cpp Wed Nov 23 16:02:16 2016
@@ -35,7 +35,7 @@ test(Iter first, Iter last)
 
 template <class Iter>
 void
-test(unsigned N)
+test(int N)
 {
     int* a = new int[N];
     for (int i = 0; i < N; ++i)

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=287823&r1=287822&r2=287823&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 Wed Nov 23 16:02:16 2016
@@ -36,7 +36,7 @@ test(Iter first, Iter last)
 
 template <class Iter>
 void
-test(unsigned N)
+test(int N)
 {
     int* a = new int[N];
     for (int i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.min.max/min_element.pass.cpp Wed Nov 23 16:02:16 2016
@@ -35,7 +35,7 @@ test(Iter first, Iter last)
 
 template <class Iter>
 void
-test(unsigned N)
+test(int N)
 {
     int* a = new int[N];
     for (int i = 0; i < N; ++i)

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=287823&r1=287822&r2=287823&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 Wed Nov 23 16:02:16 2016
@@ -36,7 +36,7 @@ test(Iter first, Iter last)
 
 template <class Iter>
 void
-test(unsigned N)
+test(int N)
 {
     int* a = new int[N];
     for (int i = 0; i < N; ++i)

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=287823&r1=287822&r2=287823&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 Wed Nov 23 16:02:16 2016
@@ -41,7 +41,7 @@ test(Iter first, Iter last)
 
 template <class Iter>
 void
-test(unsigned N)
+test(int N)
 {
     int* a = new int[N];
     for (int i = 0; i < N; ++i)

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=287823&r1=287822&r2=287823&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 Wed Nov 23 16:02:16 2016
@@ -44,7 +44,7 @@ test(Iter first, Iter last)
 
 template <class Iter>
 void
-test(unsigned N)
+test(int N)
 {
     int* a = new int[N];
     for (int i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.nth.element/nth_element.pass.cpp Wed Nov 23 16:02:16 2016
@@ -19,7 +19,7 @@
 #include <cassert>
 
 void
-test_one(unsigned N, unsigned M)
+test_one(int N, int M)
 {
     assert(N != 0);
     assert(M < N);
@@ -34,7 +34,7 @@ test_one(unsigned N, unsigned M)
 }
 
 void
-test(unsigned N)
+test(int N)
 {
     test_one(N, 0);
     test_one(N, 1);

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp Wed Nov 23 16:02:16 2016
@@ -33,7 +33,7 @@ struct indirect_less
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 void
-test_one(unsigned N, unsigned M)
+test_one(int N, int M)
 {
     assert(N != 0);
     assert(M < N);
@@ -48,7 +48,7 @@ test_one(unsigned N, unsigned M)
 }
 
 void
-test(unsigned N)
+test(int N)
 {
     test_one(N, 0);
     test_one(N, 1);

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp Wed Nov 23 16:02:16 2016
@@ -24,7 +24,7 @@
 
 template <class Iter>
 void
-test_larger_sorts(unsigned N, unsigned M)
+test_larger_sorts(int N, int M)
 {
     int* input = new int[N];
     int* output = new int[M];
@@ -43,7 +43,7 @@ test_larger_sorts(unsigned N, unsigned M
 
 template <class Iter>
 void
-test_larger_sorts(unsigned N)
+test_larger_sorts(int N)
 {
     test_larger_sorts<Iter>(N, 0);
     test_larger_sorts<Iter>(N, 1);

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp Wed Nov 23 16:02:16 2016
@@ -27,7 +27,7 @@
 
 template <class Iter>
 void
-test_larger_sorts(unsigned N, unsigned M)
+test_larger_sorts(int N, int M)
 {
     int* input = new int[N];
     int* output = new int[M];
@@ -47,7 +47,7 @@ test_larger_sorts(unsigned N, unsigned M
 
 template <class Iter>
 void
-test_larger_sorts(unsigned N)
+test_larger_sorts(int N)
 {
     test_larger_sorts<Iter>(N, 0);
     test_larger_sorts<Iter>(N, 1);

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort.pass.cpp Wed Nov 23 16:02:16 2016
@@ -19,7 +19,7 @@
 #include <cassert>
 
 void
-test_larger_sorts(unsigned N, unsigned M)
+test_larger_sorts(int N, int M)
 {
     assert(N != 0);
     assert(N >= M);
@@ -37,7 +37,7 @@ test_larger_sorts(unsigned N, unsigned M
 }
 
 void
-test_larger_sorts(unsigned N)
+test_larger_sorts(int N)
 {
     test_larger_sorts(N, 0);
     test_larger_sorts(N, 1);

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp?rev=287823&r1=287822&r2=287823&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp Wed Nov 23 16:02:16 2016
@@ -33,7 +33,7 @@ struct indirect_less
 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
 
 void
-test_larger_sorts(unsigned N, unsigned M)
+test_larger_sorts(int N, int M)
 {
     assert(N != 0);
     assert(N >= M);
@@ -51,7 +51,7 @@ test_larger_sorts(unsigned N, unsigned M
 }
 
 void
-test_larger_sorts(unsigned N)
+test_larger_sorts(int N)
 {
     test_larger_sorts(N, 0);
     test_larger_sorts(N, 1);

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=287823&r1=287822&r2=287823&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 Wed Nov 23 16:02:16 2016
@@ -72,7 +72,7 @@ test_sort_()
 }
 
 void
-test_larger_sorts(unsigned N, unsigned M)
+test_larger_sorts(int N, int M)
 {
     assert(N != 0);
     assert(M != 0);
@@ -112,7 +112,7 @@ test_larger_sorts(unsigned N, unsigned M
 }
 
 void
-test_larger_sorts(unsigned N)
+test_larger_sorts(int N)
 {
     test_larger_sorts(N, 1);
     test_larger_sorts(N, 2);

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=287823&r1=287822&r2=287823&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 Wed Nov 23 16:02:16 2016
@@ -72,7 +72,7 @@ test_sort_()
 }
 
 void
-test_larger_sorts(unsigned N, unsigned M)
+test_larger_sorts(int N, int M)
 {
     assert(N != 0);
     assert(M != 0);
@@ -112,7 +112,7 @@ test_larger_sorts(unsigned N, unsigned M
 }
 
 void
-test_larger_sorts(unsigned N)
+test_larger_sorts(int N)
 {
     test_larger_sorts(N, 1);
     test_larger_sorts(N, 2);




More information about the cfe-commits mailing list