diff --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp --- a/clang-tools-extra/clangd/Protocol.cpp +++ b/clang-tools-extra/clangd/Protocol.cpp @@ -1002,7 +1002,7 @@ Result.push_back(Tok.tokenModifiers); } assert(Result.size() == SemanticTokenEncodingSize * Toks.size()); - return Result; + return std::move(Result); } bool operator==(const SemanticToken &L, const SemanticToken &R) { @@ -1030,7 +1030,7 @@ Result["edits"] = *TE.edits; if (TE.tokens) Result["data"] = encodeTokens(*TE.tokens); - return Result; + return std::move(Result); } bool fromJSON(const llvm::json::Value &Params, SemanticTokensParams &R) {