diff --git a/llvm/include/llvm/Support/AllocatorBase.h b/llvm/include/llvm/Support/AllocatorBase.h index 0442432250069..3cfc4425bd406 100644 --- a/llvm/include/llvm/Support/AllocatorBase.h +++ b/llvm/include/llvm/Support/AllocatorBase.h @@ -111,7 +111,7 @@ template class AllocatorHolder : Alloc { public: AllocatorHolder() = default; AllocatorHolder(const Alloc &A) : Alloc(A) {} - AllocatorHolder(Alloc &&A) : Alloc(static_cast(A)) {} + AllocatorHolder(Alloc &&A) : Alloc(std::move(A)) {} Alloc &getAllocator() { return *this; } const Alloc &getAllocator() const { return *this; } };