llvm-project/libcxx/test
Louis Dionne 12b01ab7fa [libc++] Don't trigger unsigned conversion warnings in std::advance
The Standard documents the signature of std::advance as

    template <class Iter, class Distance>
    constexpr void advance(Iter& i, Distance n);

Furthermore, it does not appear to put any restriction on what the type
of Distance should be. While it is understood that it should usually
be std::iterator_traits::difference_type, I couldn't find any wording
that mandates that. Similarly, I couldn't find wording that forces the
distance to be a signed type.

This patch changes std::advance to accept any type in the second argument,
which appears to be what the Standard mandates. We then coerce it to the
iterator's difference type, but that's an implementation detail.

Differential Revision: https://reviews.llvm.org/D81425
2020-06-16 13:47:47 -04:00
..
libcxx [libc++] Add the ability to run arbitrary programs using the DSL 2020-06-15 14:59:53 -04:00
pretty_printers [libc++] Remove redundant UNSUPPORTED annotation for the GDB pretty-printer tests 2020-06-12 10:57:11 -04:00
std [libc++] Don't trigger unsigned conversion warnings in std::advance 2020-06-16 13:47:47 -04:00
support [libcxx][test] MSVC's __is_trivially_copyable is fixed in VS 16.7 2020-06-10 13:55:33 -07:00
CMakeLists.txt [libc++] Allow specifying arbitrary custom executors with the new format 2020-06-11 16:24:29 -04:00
lit.cfg [libc++] 2/N: Enable the new libc++ testing format by default 2020-04-06 18:35:17 -04:00
lit.site.cfg.in [libc++] Link against libatomic when it is found 2020-06-05 09:28:44 -04:00