[libcxx-commits] [PATCH] D102327: [pstl] Use logical operator for loop condition in tests

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 13 10:12:03 PDT 2021


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7f607ac6af0e: [pstl] Use logical operator for loop condition in tests (authored by zoecarver).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102327/new/

https://reviews.llvm.org/D102327

Files:
  pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
  pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp


Index: pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
===================================================================
--- pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
+++ pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
@@ -71,7 +71,7 @@
             {
                 Sequence<T> in(n1, [](std::size_t) { return T(0); });
                 std::size_t i = r, isub = 0;
-                for (; i < n1 & isub < n2; ++i, ++isub)
+                for (; i < n1 && isub < n2; ++i, ++isub)
                     in[i] = value;
 
                 invoke_on_all_policies(test_one_policy(), in.begin(), in.begin() + n1, n2, value, std::equal_to<T>());
Index: pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
===================================================================
--- pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
+++ pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
@@ -81,7 +81,7 @@
             for (auto r : res)
             {
                 std::size_t i = r, isub = 0;
-                for (; i < n1 & isub < n2; ++i, ++isub)
+                for (; i < n1 && isub < n2; ++i, ++isub)
                     in[i] = sub[isub];
                 invoke_on_all_policies(test_one_policy(), in.begin(), in.begin() + n1, sub.begin(), sub.begin() + n2,
                                        std::equal_to<T>());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102327.345203.patch
Type: text/x-patch
Size: 1395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210513/c90d22a3/attachment.bin>


More information about the libcxx-commits mailing list