junaire updated this revision to Diff 425134. junaire added a comment. use std::move().
I'm not sure this will be better but hope it will make others happy :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123436/new/ https://reviews.llvm.org/D123436 Files: clang/lib/Serialization/GlobalModuleIndex.cpp Index: clang/lib/Serialization/GlobalModuleIndex.cpp =================================================================== --- clang/lib/Serialization/GlobalModuleIndex.cpp +++ clang/lib/Serialization/GlobalModuleIndex.cpp @@ -277,7 +277,7 @@ return std::make_pair(nullptr, Res.takeError()); } - return std::make_pair(new GlobalModuleIndex(std::move(Buffer), Cursor), + return std::make_pair(new GlobalModuleIndex(std::move(Buffer), std::move(Cursor)), llvm::Error::success()); }
Index: clang/lib/Serialization/GlobalModuleIndex.cpp =================================================================== --- clang/lib/Serialization/GlobalModuleIndex.cpp +++ clang/lib/Serialization/GlobalModuleIndex.cpp @@ -277,7 +277,7 @@ return std::make_pair(nullptr, Res.takeError()); } - return std::make_pair(new GlobalModuleIndex(std::move(Buffer), Cursor), + return std::make_pair(new GlobalModuleIndex(std::move(Buffer), std::move(Cursor)), llvm::Error::success()); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits