diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-09-23 18:25:34 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-09-23 18:25:34 +0100 |
commit | 13190419240ac47394feb896e0ff5f33e9f28906 (patch) | |
tree | 56614f636249d7a44d3995a94376be8ae7c06f05 /gcc/go/go-gcc.cc | |
parent | a922c5ff6f3872fc9ce1e484a0e92f288ff6c68d (diff) | |
download | gcc-13190419240ac47394feb896e0ff5f33e9f28906.zip gcc-13190419240ac47394feb896e0ff5f33e9f28906.tar.gz gcc-13190419240ac47394feb896e0ff5f33e9f28906.tar.bz2 |
Avoid reallocation for basic_string::clear()
PR libstdc++/56166
PR libstdc++/77582
* include/bits/basic_string.h (basic_string::clear()): Drop reference
and use empty rep.
* include/ext/rc_string_base.h (__rc_string_base::_M_clear()):
Likewise.
* testsuite/21_strings/basic_string/56166.cc: New.
* testsuite/ext/vstring/modifiers/clear/56166.cc: New.
From-SVN: r240447
Diffstat (limited to 'gcc/go/go-gcc.cc')
0 files changed, 0 insertions, 0 deletions