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

Marshall Clow via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 16 06:51:17 PST 2018

mclow.lists added a comment.

I'm a bit leery of this patch.  Not because of what it's trying to do, but rather, the introduction of a method `__clear_and_shrink` that leaves the string in an invalid state.   For all the uses that you put it to, I don't think that's a problem (though I'm still working through the failure possibilities), but I can see other people attempting to use this method - and not realizing that you have to "put the string back together" afterwards.

Maybe I'm just being paranoid.


More information about the cfe-commits mailing list