[PATCH] D78487: Explicitly move from llvm::json Array/Object to Value
Michael Forster via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 20 05:53:26 PDT 2020
MForster created this revision.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous.
Herald added a project: clang.
MForster retitled this revision from "Explicitly move from llvm::json Array to Value" to "Explicitly move from llvm::json Array/Object to Value".
MForster added a reviewer: sammccall.
The implicit conversion fails under Clang 3.8.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78487
Files:
clang-tools-extra/clangd/Protocol.cpp
Index: clang-tools-extra/clangd/Protocol.cpp
===================================================================
--- clang-tools-extra/clangd/Protocol.cpp
+++ 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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78487.258714.patch
Type: text/x-patch
Size: 704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200420/bf0b8ced/attachment-0001.bin>
More information about the cfe-commits
mailing list