[libcxx-commits] [PATCH] D151223: [libc++] Fixes use-after move diagnostic.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 31 08:21:52 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGac7d60f73a4a: [libc++] Fixes use-after move diagnostic. (authored by Mordante).
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.527054.patch
Type: text/x-patch
Size: 1229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230531/3df1cc67/attachment-0001.bin>
More information about the libcxx-commits
mailing list