llvm-project/libcxx/include/__algorithm
Arthur O'Dwyer 16bf43398a [libc++] Comma-operator-proof a lot of algorithm/container code.
Detected by evil-izing the widely used `MoveOnly` testing type.
I had to patch some tests that were themselves using its comma operator,
but I think that's a worthwhile cost in order to catch more places
in our headers that needed comma-proofing.

The trick here is that even `++ptr, SomeClass()` can find a comma operator
by ADL, if `ptr` is of type `Evil*`. (A comma between two operands
of non-class-or-enum type is always treated as the built-in
comma, without ADL. But if either operand is class-or-enum, then
ADL happens for _both_ operands' types.)

Differential Revision: https://reviews.llvm.org/D109414
2021-09-08 13:34:01 -04:00
..
adjacent_find.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
all_of.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
any_of.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
binary_search.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
clamp.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
comp.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
comp_ref_type.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
copy.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
copy_backward.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
copy_if.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
copy_n.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
count.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
count_if.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
equal.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
equal_range.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
fill.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
fill_n.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
find.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
find_end.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
find_first_of.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
find_if.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
find_if_not.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
for_each.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
for_each_n.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
generate.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
generate_n.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
half_positive.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
includes.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
inplace_merge.h [libc++] NFCI: Remove code duplication and obsolete declarations in wrap_iter 2021-06-29 10:51:07 -04:00
is_heap.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
is_heap_until.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
is_partitioned.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
is_permutation.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
is_sorted.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
is_sorted_until.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
iter_swap.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
lexicographical_compare.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
lower_bound.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
make_heap.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
max.h [libcxx] Move all algorithms into their own headers 2021-06-19 07:49:06 -04:00
max_element.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
merge.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
min.h [libcxx] Move all algorithms into their own headers 2021-06-19 07:49:06 -04:00
min_element.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
minmax.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
minmax_element.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
mismatch.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
move.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
move_backward.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
next_permutation.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
none_of.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
nth_element.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
partial_sort.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
partial_sort_copy.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
partition.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
partition_copy.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
partition_point.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
pop_heap.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
prev_permutation.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
push_heap.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
remove.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
remove_copy.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
remove_copy_if.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
remove_if.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
replace.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
replace_copy.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
replace_copy_if.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
replace_if.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
reverse.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
reverse_copy.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
rotate.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
rotate_copy.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
sample.h [libc++] IWYU to fix Modules complaints about _LIBCPP_ASSERT. NFCI. 2021-08-06 09:20:59 -04:00
search.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
search_n.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
set_difference.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
set_intersection.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
set_symmetric_difference.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
set_union.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
shift_left.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
shift_right.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
shuffle.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
sift_down.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
sort.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
sort_heap.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
stable_partition.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
stable_sort.h [libc++] Comma-operator-proof a lot of algorithm/container code. 2021-09-08 13:34:01 -04:00
swap_ranges.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
transform.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
unique.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
unique_copy.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
unwrap_iter.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00
upper_bound.h [libc++][NFC] Remove useless _LIBCPP_PUSH_MACROS 2021-08-27 12:41:55 -04:00