llvm-project/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev
Louis Dionne d27cbfa9d3 [libc++] Fix bug in ranges::advance
In `ranges::advance(iter, n, bound)`, we'd incorrectly handle the case
where bound < iter and n is 0:

    int a[10];
    int *p = a+5;
    int *bound = a+3;
    std::ranges::advance(p, 0, bound);
    assert(p - a == 5); // we'd return 3 before this patch

This was caused by an incorrect handling of 0 inside __magnitude_geq.

Differential Revision: https://reviews.llvm.org/D117240
2022-01-27 10:57:54 -05:00
..
constraints.compile.pass.cpp [libc++] Remove Lit annotations for unsupported GCC versions from the test suite 2021-08-12 13:30:47 -04:00
iterator.pass.cpp [libc++] Refactor the tests for ranges::{advance,next,prev} 2022-01-13 13:57:55 -05:00
iterator_count.pass.cpp [libc++] Refactor the tests for ranges::{advance,next,prev} 2022-01-13 13:57:55 -05:00
iterator_count_sentinel.pass.cpp [libc++] Fix bug in ranges::advance 2022-01-27 10:57:54 -05:00