[clang-tools-extra] 9b2386e - [clangd] Fix JSON conversion for symbol tags (#84747)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 11 05:17:02 PDT 2024
Author: Christian Kandeler
Date: 2024-03-11T13:16:58+01:00
New Revision: 9b2386e82dedafade233c8871637ee76da9ebe0e
URL: https://github.com/llvm/llvm-project/commit/9b2386e82dedafade233c8871637ee76da9ebe0e
DIFF: https://github.com/llvm/llvm-project/commit/9b2386e82dedafade233c8871637ee76da9ebe0e.diff
LOG: [clangd] Fix JSON conversion for symbol tags (#84747)
The wrong constructor of json::Value got called, making every tag an
array instead of a number.
Added:
Modified:
clang-tools-extra/clangd/Protocol.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp
index 8aa18bb0058abe..c6553e00dcae28 100644
--- a/clang-tools-extra/clangd/Protocol.cpp
+++ b/clang-tools-extra/clangd/Protocol.cpp
@@ -1412,7 +1412,7 @@ bool fromJSON(const llvm::json::Value &Params, ReferenceParams &R,
}
llvm::json::Value toJSON(SymbolTag Tag) {
- return llvm::json::Value{static_cast<int>(Tag)};
+ return llvm::json::Value(static_cast<int>(Tag));
}
llvm::json::Value toJSON(const CallHierarchyItem &I) {
More information about the cfe-commits
mailing list