[libcxx-commits] [libcxx] [libc++] Merge the segmented iterator code for {copy, move}_backward (PR #165160)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Oct 26 09:04:25 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 origin/main HEAD --extensions h -- libcxx/include/__algorithm/copy_backward.h libcxx/include/__algorithm/for_each_segment.h libcxx/include/__algorithm/move_backward.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__algorithm/for_each_segment.h b/libcxx/include/__algorithm/for_each_segment.h
index de0ed243d..3445f34c2 100644
--- a/libcxx/include/__algorithm/for_each_segment.h
+++ b/libcxx/include/__algorithm/for_each_segment.h
@@ -54,7 +54,7 @@ __for_each_segment_backward(_SegmentedIterator __first, _SegmentedIterator __las
using _Traits = __segmented_iterator_traits<_SegmentedIterator>;
auto __sfirst = _Traits::__segment(__first);
- auto __slast = _Traits::__segment(__last);
+ auto __slast = _Traits::__segment(__last);
// We are in a single segment, so we might not be at the beginning or end
if (__sfirst == __slast) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/165160
More information about the libcxx-commits
mailing list