[libc++] Fix reverse_iterator test when UBSan is enabled
authorLouis Dionne <ldionne@apple.com>
Wed, 4 Mar 2020 16:32:49 +0000 (11:32 -0500)
committerLouis Dionne <ldionne@apple.com>
Wed, 4 Mar 2020 16:35:34 +0000 (11:35 -0500)
commita2fe17cdc6501ca0a18218487fc35afef4f5f17a
tree63e9b5886a675acabde0ae45799b6145d3403389
parent71a316883d503ba9020d78089d276e73a6113cef
[libc++] Fix reverse_iterator test when UBSan is enabled

The goal of the test was only to check that we could access the
`this->current` member of std::reverse_iterator from a derived
class, but in doing so we incremented a null iterator, which is UB.
libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iterator/types.pass.cpp