[libcxx-commits] [libcxx] [libc++] Optimize std::for_each_n for segmented iterators (PR #135468)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 14 16:19:13 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- libcxx/include/__algorithm/for_each_n_segment.h libcxx/test/benchmarks/algorithms/nonmodifying/for_each_n.bench.cpp libcxx/include/__algorithm/for_each_n.h libcxx/include/__iterator/segmented_iterator.h libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp
index 56ae45db7..73fa4a382 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp
@@ -48,7 +48,7 @@ struct deque_test {
/*TEST_CONSTEXPR_CXX26*/
void test_deque_and_join_view_iterators() { // TODO: Mark as TEST_CONSTEXPR_CXX26 once std::deque is constexpr
- { // Verify that segmented deque iterators work properly
+ { // Verify that segmented deque iterators work properly
int sizes[] = {0, 1, 2, 1023, 1024, 1025, 2047, 2048, 2049};
for (const int size : sizes) {
std::deque<int> d(size);
``````````
</details>
https://github.com/llvm/llvm-project/pull/135468
More information about the libcxx-commits
mailing list