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

Timothy VanSlyke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 20 12:42:44 PST 2018


tvanslyke updated this revision to Diff 130775.
tvanslyke added a comment.

Since `__clear_and_shrink()` is private the test covers copy and move assignment.  I also ran the libcxx/strings/basic.string and std/strings tests with a hard-coded `assert(__invariants());` at the end of `__clear_and_shrink()` and saw no failures.

I don't have commit access myself so I've added the test to the diff.


https://reviews.llvm.org/D41976

Files:
  include/string
  test/libcxx/strings/basic.string/string.modifiers/copy_assign_move_assign_db1.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41976.130775.patch
Type: text/x-patch
Size: 3745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180120/c05fc839/attachment-0001.bin>


More information about the cfe-commits mailing list