[PATCH] D74062: [ADT] Fix iplist_impl - use after move warnings (PR43943)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 6 03:28:02 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG529e6f8791b6: [ADT] Fix iplist_impl - use after move warnings (PR43943) (authored by RKSimon).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74062/new/
https://reviews.llvm.org/D74062
Files:
llvm/include/llvm/ADT/ilist.h
Index: llvm/include/llvm/ADT/ilist.h
===================================================================
--- llvm/include/llvm/ADT/ilist.h
+++ llvm/include/llvm/ADT/ilist.h
@@ -198,10 +198,12 @@
iplist_impl &operator=(const iplist_impl &) = delete;
iplist_impl(iplist_impl &&X)
- : TraitsT(std::move(X)), IntrusiveListT(std::move(X)) {}
+ : TraitsT(std::move(static_cast<TraitsT &>(X))),
+ IntrusiveListT(std::move(static_cast<IntrusiveListT &>(X))) {}
iplist_impl &operator=(iplist_impl &&X) {
- *static_cast<TraitsT *>(this) = std::move(X);
- *static_cast<IntrusiveListT *>(this) = std::move(X);
+ *static_cast<TraitsT *>(this) = std::move(static_cast<TraitsT &>(X));
+ *static_cast<IntrusiveListT *>(this) =
+ std::move(static_cast<IntrusiveListT &>);
return *this;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74062.242852.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200206/343f4d7d/attachment.bin>
More information about the llvm-commits
mailing list