summaryrefslogtreecommitdiffstats
path: root/pstl/test/std/algorithms/alg.modifying.operations
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-05-30 20:46:31 +0000
committerLouis Dionne <ldionne@apple.com>2019-05-30 20:46:31 +0000
commit5c4c44310a38ff77e15585636da57a66e737570d (patch)
tree6b969b713f66bcbbb6650fae8772bc4aba63b2c4 /pstl/test/std/algorithms/alg.modifying.operations
parenta481b01e958b19c2eb6564ab8930eae9058967f8 (diff)
downloadbcm5719-llvm-5c4c44310a38ff77e15585636da57a66e737570d.tar.gz
bcm5719-llvm-5c4c44310a38ff77e15585636da57a66e737570d.zip
[pstl] Remove various warnings in the pstl headers and tests
- unused parameter warnings - don't use single-letter template parameter names, like we do in libc++ - sign-comparison warnings - unused variables in the tests - unused local typedefs in the tests - the use of #include_next - field reordering in the tests - unused lambda captures Note that the rationale for why the static_casts to unsigned are OK is that last - first must always be non-negative, since [first, last) is a valid range. llvm-svn: 362148
Diffstat (limited to 'pstl/test/std/algorithms/alg.modifying.operations')
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp
index 9b423df2933..185e98c86d2 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp
@@ -46,7 +46,8 @@ struct test_generate
{
Generator_count<T> g;
generate(exec, first, last, g);
- EXPECT_TRUE(std::count(first, last, g.default_value()) == n, "generate wrong result for generate");
+ Size count = std::count(first, last, g.default_value());
+ EXPECT_TRUE(count == n, "generate wrong result for generate");
std::fill(first, last, T(0));
}
@@ -54,7 +55,8 @@ struct test_generate
Generator_count<T> g;
const auto m = n / 2;
auto last = generate_n(exec, first, m, g);
- EXPECT_TRUE(std::count(first, last, g.default_value()) == m && last == std::next(first, m),
+ Size count = std::count(first, last, g.default_value());
+ EXPECT_TRUE(count == m && last == std::next(first, m),
"generate_n wrong result for generate_n");
std::fill(first, last, T(0));
}
OpenPOWER on IntegriCloud