diff --git a/llvm/include/llvm/ADT/ilist.h b/llvm/include/llvm/ADT/ilist.h --- a/llvm/include/llvm/ADT/ilist.h +++ b/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(X))), + IntrusiveListT(std::move(static_cast(X))) {} iplist_impl &operator=(iplist_impl &&X) { - *static_cast(this) = std::move(X); - *static_cast(this) = std::move(X); + *static_cast(this) = std::move(static_cast(X)); + *static_cast(this) = + std::move(static_cast); return *this; }