[PATCH] D27013: [libcxx] [test] Fix MSVC warning C4018 "signed/unsigned mismatch", part 1/12.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 22 16:44:32 PST 2016


STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] Fix MSVC warning C4018 "signed/unsigned mismatch", part 1/12.

Change loop indices from int to std::size_t.

Also, include <cstddef> when it wasn't already being included.


https://reviews.llvm.org/D27013

Files:
  test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search.pass.cpp
  test/std/algorithms/alg.sorting/alg.binary.search/binary.search/binary_search_comp.pass.cpp
  test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range.pass.cpp
  test/std/algorithms/alg.sorting/alg.binary.search/equal.range/equal_range_comp.pass.cpp
  test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound.pass.cpp
  test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp
  test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp
  test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp
  test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
  test/std/containers/container.adaptors/queue/queue.cons/ctor_container.pass.cpp
  test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
  test/std/containers/container.adaptors/stack/stack.cons/ctor_container.pass.cpp
  test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp
  test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp
  test/std/containers/sequences/vector.bool/push_back.pass.cpp
  test/std/input.output/string.streams/stringstream.cons/move2.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.assign/copy_assign.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.assign/move_assign.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.assign/value_assign.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/and_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/and_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/divide_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/divide_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/minus_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/minus_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/modulo_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/or_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/or_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/plus_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/plus_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/shift_left_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/shift_right_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/times_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/times_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/xor_valarray.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cassign/xor_value.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cons/copy.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cons/move.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.cons/pointer_size.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.members/resize.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.members/swap.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.unary/bit_not.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.unary/negate.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.unary/not.pass.cpp
  test/std/numerics/numarray/template.valarray/valarray.unary/plus.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/and_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/divide_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/minus_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/modulo_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/or_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/plus_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_left_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/shift_right_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/times_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.binary/xor_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/and_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/equal_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_equal_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/greater_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_equal_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/less_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/not_equal_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.comparison/or_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.special/swap.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/abs_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/acos_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/asin_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan2_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/atan_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cos_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/cosh_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/exp_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log10_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/log_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_valarray_value.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/pow_value_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sin_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sinh_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/sqrt_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tan_valarray.pass.cpp
  test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/tanh_valarray.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bernoulli/eval_param.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval_param.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval_param.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval_param.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval_param.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.int/eval_param.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval.pass.cpp
  test/std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/eval_param.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27013.78978.patch
Type: text/x-patch
Size: 122613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161123/b786670b/attachment-0001.bin>


More information about the cfe-commits mailing list