[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

Timothy VanSlyke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 16 07:13:58 PST 2018

tvanslyke added a comment.

I think the only thing we need is a call to __set_long_cap(0) in the body of the if() to make the string be in a valid state, but if you follow the logic for a call to reserve(0) (after having called clear()) it doesn't even end up doing that (unless I'm missing something).  I definitely have no problem adding the __set_long_cap(0) call to the diff.


More information about the cfe-commits mailing list