[clang-tools-extra] r347738 - [clangd] Fix backward-compatibility - follow-up to textDocument/SymbolInfo
Jan Korous via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 28 02:24:07 PST 2018
Author: jkorous
Date: Wed Nov 28 02:24:07 2018
New Revision: 347738
URL: http://llvm.org/viewvc/llvm-project?rev=347738&view=rev
Log:
[clangd] Fix backward-compatibility - follow-up to textDocument/SymbolInfo
Apparently clang 3.6 couldn't build the preceding patch.
Modified:
clang-tools-extra/trunk/clangd/Protocol.cpp
Modified: clang-tools-extra/trunk/clangd/Protocol.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Protocol.cpp?rev=347738&r1=347737&r2=347738&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Protocol.cpp (original)
+++ clang-tools-extra/trunk/clangd/Protocol.cpp Wed Nov 28 02:24:07 2018
@@ -453,7 +453,8 @@ llvm::json::Value toJSON(const SymbolDet
if (P.ID.hasValue())
result["id"] = P.ID.getValue().str();
- return result;
+ // Older clang cannot compile 'return Result', even though it is legal.
+ return json::Value(std::move(result));
}
llvm::raw_ostream &operator<<(llvm::raw_ostream &O, const SymbolDetails &S) {
More information about the cfe-commits
mailing list