[libcxx-commits] [PATCH] D151223: [libc++] Fixes use-after move diagnostic.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 30 22:49:39 PDT 2023
Mordante updated this revision to Diff 526909.
Mordante marked an inline comment as done.
Mordante added a comment.
Addresses review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151223/new/
https://reviews.llvm.org/D151223
Files:
libcxx/include/strstream
Index: libcxx/include/strstream
===================================================================
--- libcxx/include/strstream
+++ libcxx/include/strstream
@@ -256,8 +256,8 @@
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
- istrstream(istrstream&& __rhs)
- : istream(_VSTD::move(__rhs)),
+ istrstream(istrstream&& __rhs) // extension
+ : istream(_VSTD::move(static_cast<istream&>(__rhs))),
__sb_(_VSTD::move(__rhs.__sb_))
{
istream::set_rdbuf(&__sb_);
@@ -305,8 +305,8 @@
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
- ostrstream(ostrstream&& __rhs)
- : ostream(_VSTD::move(__rhs)),
+ ostrstream(ostrstream&& __rhs) // extension
+ : ostream(_VSTD::move(static_cast<ostream&>(__rhs))),
__sb_(_VSTD::move(__rhs.__sb_))
{
ostream::set_rdbuf(&__sb_);
@@ -365,8 +365,8 @@
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
- strstream(strstream&& __rhs)
- : iostream(_VSTD::move(__rhs)),
+ strstream(strstream&& __rhs) // extension
+ : iostream(_VSTD::move(static_cast<iostream&>(__rhs))),
__sb_(_VSTD::move(__rhs.__sb_))
{
iostream::set_rdbuf(&__sb_);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151223.526909.patch
Type: text/x-patch
Size: 1229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230531/00d09ba8/attachment-0001.bin>
More information about the libcxx-commits
mailing list