aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test/std/algorithms/alg.nonmodifying
diff options
context:
space:
mode:
authorStephan T. Lavavej <stl@nuwen.net>2023-12-05 06:46:41 -0800
committerGitHub <noreply@github.com>2023-12-05 09:46:41 -0500
commit164c204a19f7859d570003d4c5e82faf48cb65a9 (patch)
tree039aee664dfe2df7ec88684575da32b7f83bbc3c /libcxx/test/std/algorithms/alg.nonmodifying
parent410bf5e1425432e49a46d3c4b7962b747a976c85 (diff)
downloadllvm-164c204a19f7859d570003d4c5e82faf48cb65a9.zip
llvm-164c204a19f7859d570003d4c5e82faf48cb65a9.tar.gz
llvm-164c204a19f7859d570003d4c5e82faf48cb65a9.tar.bz2
[libc++][test] Fix simple warnings (#74186)
Found while running libc++'s tests with MSVC's STL. This fixes 3 kinds of warnings: - Add void-casts to fix `-Wunused-variable` warnings. - Avoid sign/truncation warnings in `ConvertibleToIntegral.h`. - Add `TEST_STD_AT_LEAST_23_OR_RUNTIME_EVALUATED` to avoid mixing preprocessor and runtime tests. - Cleanup: Add `TEST_STD_AT_LEAST_20_OR_RUNTIME_EVALUATED` for consistency.
Diffstat (limited to 'libcxx/test/std/algorithms/alg.nonmodifying')
-rw-r--r--libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp
index cc832fe..904100c 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count.pass.cpp
@@ -38,7 +38,7 @@ struct Test {
TEST_CONSTEXPR_CXX20 bool test() {
types::for_each(types::cpp17_input_iterator_list<const int*>(), Test());
- if (!TEST_IS_CONSTANT_EVALUATED || TEST_STD_VER >= 20) {
+ if (TEST_STD_AT_LEAST_20_OR_RUNTIME_EVALUATED) {
std::vector<bool> vec(256 + 64);
for (ptrdiff_t i = 0; i != 256; ++i) {
for (size_t offset = 0; offset != 64; ++offset) {