aboutsummaryrefslogtreecommitdiff
path: root/include/gcc-cp-interface.h
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2022-07-12 20:18:56 -0400
committerMarek Polacek <polacek@redhat.com>2022-07-13 14:22:09 -0400
commit86a15b266a7284f3aa1b12494a475f31416b981d (patch)
tree8fabb6fd5fb4352fbbe2832d1bd3260f98848ec5 /include/gcc-cp-interface.h
parentf70c18524221dcefa6cd26cee7b55503181bd912 (diff)
downloadgcc-86a15b266a7284f3aa1b12494a475f31416b981d.zip
gcc-86a15b266a7284f3aa1b12494a475f31416b981d.tar.gz
gcc-86a15b266a7284f3aa1b12494a475f31416b981d.tar.bz2
libcpp: Avoid pessimizing std::move [PR106272]
std::move in a return statement can prevent the NRVO: <https://developers.redhat.com/blog/2019/04/12/understanding-when-not-to-stdmove-in-c> PR106272 reports that we have two such cases in class label_text's member functions. We have -Wpessimizing-move that's supposed to detect problematic std::move uses, but in this case it didn't trigger. I've filed PR106276 to track that. PR preprocessor/106272 libcpp/ChangeLog: * include/line-map.h (class label_text): Don't std::move in a return statement.
Diffstat (limited to 'include/gcc-cp-interface.h')
0 files changed, 0 insertions, 0 deletions