aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-07-14 10:23:27 +0200
committerMartin Liska <mliska@suse.cz>2022-07-14 10:23:27 +0200
commit2d4ba09d237b0a96caea98cb4e8a2ceb99d0d538 (patch)
treea9bad20764f0b5fb830c6d4e57f58b3c2073ff6c /libcpp
parentb9dc4e9c94877b52037f2bd4eb01b5d179e41a43 (diff)
parent47725f78dc5788f6557ca851529ab6d7b74ca824 (diff)
downloadgcc-2d4ba09d237b0a96caea98cb4e8a2ceb99d0d538.zip
gcc-2d4ba09d237b0a96caea98cb4e8a2ceb99d0d538.tar.gz
gcc-2d4ba09d237b0a96caea98cb4e8a2ceb99d0d538.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog6
-rw-r--r--libcpp/include/line-map.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 1a211f32..fe02298 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,9 @@
+2022-07-13 Marek Polacek <polacek@redhat.com>
+
+ PR preprocessor/106272
+ * include/line-map.h (class label_text): Don't std::move in a return
+ statement.
+
2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
PR preprocessor/97498
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index c6379ce..c434a24 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -1873,13 +1873,13 @@ public:
longer-lived owner. */
static label_text borrow (const char *buffer)
{
- return std::move (label_text (const_cast <char *> (buffer), false));
+ return label_text (const_cast <char *> (buffer), false);
}
/* Create a label_text instance that takes ownership of BUFFER. */
static label_text take (char *buffer)
{
- return std::move (label_text (buffer, true));
+ return label_text (buffer, true);
}
/* Take ownership of the buffer, copying if necessary. */