summaryrefslogtreecommitdiffstats
path: root/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-06-19 20:15:50 +0000
committerLouis Dionne <ldionne@apple.com>2019-06-19 20:15:50 +0000
commit3491119f9ba466ed871a789eb91e3b7577e36272 (patch)
tree1afc4af7d6e98ed44edfdd033ac50026bd0b5e74 /pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
parentf46f41411b1fa1360fb13235df77e60c8b6e8992 (diff)
downloadbcm5719-llvm-3491119f9ba466ed871a789eb91e3b7577e36272.tar.gz
bcm5719-llvm-3491119f9ba466ed871a789eb91e3b7577e36272.zip
[pstl] Remove warnings in tests and headers
Mostly unused parameter, unused local typedefs and shadowed declarations. This massaging it necessary if we want to be able to run the tests under the libc++ lit configuration. llvm-svn: 363872
Diffstat (limited to 'pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp')
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
index 9f172a4b97a..fc5f1533e8c 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
@@ -21,9 +21,9 @@ struct copy_int
{
int32_t value;
int32_t copied_times = 0;
- explicit copy_int(int32_t val = 0) { value = val; }
+ constexpr explicit copy_int(int32_t val = 0) : value(val) { }
- copy_int&
+ constexpr copy_int&
operator=(const copy_int& other)
{
if (&other == this)
@@ -36,7 +36,7 @@ struct copy_int
return *this;
}
- bool
+ constexpr bool
operator==(const copy_int& other) const
{
return (value == other.value);
@@ -81,7 +81,7 @@ struct test_one_policy
template <typename T, typename Iterator1>
bool
- check(Iterator1 b, Iterator1 e)
+ check(Iterator1, Iterator1)
{
return true;
}
@@ -102,13 +102,13 @@ test(Pred pred)
const std::size_t max_len = 100000;
- const T1 value = T1(0);
- const T1 new_value = T1(666);
+ static constexpr T1 value = T1(0);
+ static constexpr T1 new_value = T1(666);
Sequence<T2> expected(max_len);
Sequence<T2> actual(max_len);
- Sequence<T2> data(max_len, [&value](std::size_t i) {
+ Sequence<T2> data(max_len, [](std::size_t i) {
if (i % 3 == 2)
{
return T1(i);
OpenPOWER on IntegriCloud