diff --git a/clang/include/clang/AST/ASTVector.h b/clang/include/clang/AST/ASTVector.h index 088d1348bc13..1490a13f843b 100644 --- a/clang/include/clang/AST/ASTVector.h +++ b/clang/include/clang/AST/ASTVector.h @@ -58,7 +58,8 @@ public: reserve(C, N); } - ASTVector &operator=(ASTVector O) { + ASTVector &operator=(ASTVector &&RHS) { + ASTVector O(std::move(RHS)); using std::swap; swap(Begin, O.Begin); swap(End, O.End);