[libc++] [LIBCXX-DEBUG-FIXME] Stop using invalid iterators to insert into sets/maps.
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Tue, 20 Apr 2021 19:38:57 +0000 (15:38 -0400)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Wed, 5 May 2021 20:21:09 +0000 (16:21 -0400)
commit9ea2db2c513534aa63acc087b8dc744c37119d02
tree338fe440b8c7087292466c63996e550ac0c4b3f8
parent9571b8f238f97bce01bcf3c84a4f87cfb1c00dbf
[libc++] [LIBCXX-DEBUG-FIXME] Stop using invalid iterators to insert into sets/maps.

This simply applies Howard's commit 4c80bfbd53caf consistently
across all the associative and unordered container tests.

"unord.set/insert_hint_const_lvalue.pass.cpp" failed with `-D_LIBCPP_DEBUG=1`
before this patch; it was the only one that incorrectly reused
invalid iterator `e`. The others already used valid iterators
(generally `c.end()`); I'm just making them all match the same pattern
of usage: "e, then r, then c.end() for the rest."

Differential Revision: https://reviews.llvm.org/D101679
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_const_lvalue.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.modifiers/insert_hint_rvalue.pass.cpp
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_hint_const_lvalue.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/insert_hint_const_lvalue.pass.cpp
libcxx/test/std/containers/unord/unord.set/insert_hint_const_lvalue.pass.cpp
libcxx/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp