[libcxx-commits] [PATCH] D151223: [libc++] Fixes use-after move diagnostic.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 30 14:01:37 PDT 2023
ldionne added inline comments.
================
Comment at: libcxx/include/strstream:260
+ istrstream(istrstream&& __rhs) // extension
+ : istream(_VSTD::move(static_cast<istrstream&>(__rhs))),
__sb_(_VSTD::move(__rhs.__sb_))
----------------
Don't you mean `istream&` here instead? You want to cast to the base class?
================
Comment at: libcxx/include/strstream:309
+ ostrstream(ostrstream&& __rhs) // extension
+ : ostream(_VSTD::move(static_cast<ostrstream&>(__rhs))),
__sb_(_VSTD::move(__rhs.__sb_))
----------------
Same here.
================
Comment at: libcxx/include/strstream:369
+ strstream(strstream&& __rhs) // extension
+ : iostream(_VSTD::move(static_cast<iostream&>(__rhs))),
__sb_(_VSTD::move(__rhs.__sb_))
----------------
This one looks right.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151223/new/
https://reviews.llvm.org/D151223
More information about the libcxx-commits
mailing list