[all-commits] [llvm/llvm-project] 838f28: [libc++] Eliminate extra allocations from `std::mo...

Amirreza Ashouri via All-commits all-commits at lists.llvm.org
Tue Oct 17 02:38:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 838f2890fd30295b771908e234fb06cb169cf355
      https://github.com/llvm/llvm-project/commit/838f2890fd30295b771908e234fb06cb169cf355
  Author: Amirreza Ashouri <ar.ashouri999 at gmail.com>
  Date:   2023-10-17 (Tue, 17 Oct 2023)

  Changed paths:
    M libcxx/include/sstream
    M libcxx/include/string
    A libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.allocator_propagation.pass.cpp
    M libcxx/test/std/input.output/string.streams/istringstream/istringstream.members/str.move.pass.cpp
    A libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.allocator_propagation.pass.cpp
    M libcxx/test/std/input.output/string.streams/ostringstream/ostringstream.members/str.move.pass.cpp
    M libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/str.move.pass.cpp
    M libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/str.pass.cpp
    M libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.members/view.pass.cpp
    A libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/str.allocator_propagation.pass.cpp
    M libcxx/test/std/input.output/string.streams/stringstream/stringstream.members/str.move.pass.cpp
    M libcxx/test/support/test_allocator.h

  Log Message:
  -----------
  [libc++] Eliminate extra allocations from `std::move(oss).str()` (#67294)

Add test coverage for the new behaviors, especially to verify that the
returned string uses the correct allocator.
Fixes https://github.com/llvm/llvm-project/issues/64644

Migrated from https://reviews.llvm.org/D157776 — @philnik777  @pfusik 
@ldionne @mordante 
 please take another look!




More information about the All-commits mailing list