Skip to content

Commit 3b5c6bf

Browse files
[Support] Use std::move in AllocatorHolder's move constructor (NFC) (#160444)
std::move is more idiomatic and readable than the equivalent static_cast.
1 parent 934f802 commit 3b5c6bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Support/AllocatorBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ template <typename Alloc> class AllocatorHolder : Alloc {
111111
public:
112112
AllocatorHolder() = default;
113113
AllocatorHolder(const Alloc &A) : Alloc(A) {}
114-
AllocatorHolder(Alloc &&A) : Alloc(static_cast<Alloc &&>(A)) {}
114+
AllocatorHolder(Alloc &&A) : Alloc(std::move(A)) {}
115115
Alloc &getAllocator() { return *this; }
116116
const Alloc &getAllocator() const { return *this; }
117117
};

0 commit comments

Comments
 (0)