summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/Protocol.cpp
diff options
context:
space:
mode:
authorKirill Bobyrev <kbobyrev@google.com>2020-02-13 14:17:30 +0100
committerKirill Bobyrev <kbobyrev@google.com>2020-02-13 15:14:20 +0100
commitda883d2c3b2fcf4977f2bbac11012da804655919 (patch)
tree751cfb4e659a8eb4876a0e92cc39918c3939cb48 /clang-tools-extra/clangd/Protocol.cpp
parent90c78073f73eac58f4f8b4772a896dc8aac023bc (diff)
downloadbcm5719-llvm-da883d2c3b2fcf4977f2bbac11012da804655919.tar.gz
bcm5719-llvm-da883d2c3b2fcf4977f2bbac11012da804655919.zip
[clangd] Expose Code Completion score to the client
Summary: Make it possible for the client to adjust the ranking by using the score Clangd calculates for the completion items. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74547 (cherry picked from commit ff7b5bac04fa4946935ea45214e29f267d6c1d7b)
Diffstat (limited to 'clang-tools-extra/clangd/Protocol.cpp')
-rw-r--r--clang-tools-extra/clangd/Protocol.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/Protocol.cpp b/clang-tools-extra/clangd/Protocol.cpp
index 29ceb1da545..7aca377cebe 100644
--- a/clang-tools-extra/clangd/Protocol.cpp
+++ b/clang-tools-extra/clangd/Protocol.cpp
@@ -826,6 +826,7 @@ llvm::json::Value toJSON(const CompletionItem &CI) {
Result["additionalTextEdits"] = llvm::json::Array(CI.additionalTextEdits);
if (CI.deprecated)
Result["deprecated"] = CI.deprecated;
+ Result["score"] = CI.score;
return std::move(Result);
}
OpenPOWER on IntegriCloud