This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Comma-operator-proof a lot of algorithm/container code.
ClosedPublic

Authored by Quuxplusone on Sep 7 2021, 8:11 PM.

Details

Summary

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, ++ptr can find a comma operator by ADL, if ptr is of type Evil*.

Diff Detail

Event Timeline

Quuxplusone requested review of this revision.Sep 7 2021, 8:11 PM
Quuxplusone created this revision.
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptSep 7 2021, 8:11 PM
ldionne accepted this revision.Sep 8 2021, 8:47 AM
This revision is now accepted and ready to land.Sep 8 2021, 8:47 AM