[clangd] Make completion scores use 0-1 floats internally.
authorSam McCall <sam.mccall@gmail.com>
Thu, 23 Nov 2017 17:09:04 +0000 (17:09 +0000)
committerSam McCall <sam.mccall@gmail.com>
Thu, 23 Nov 2017 17:09:04 +0000 (17:09 +0000)
commitb8d548a3de8619ec6e07b0ff2af2e94b485586c3
tree4610f012d672211ee17e2f5ecfed0e3ab3e3e001
parent6f67bcbb93bda6cf0654a74721de97a3adc1605b
[clangd] Make completion scores use 0-1 floats internally.

Summary:
This scale is much easier to mix with other signals, such as fuzzy match strength.
Mostly NFC, but it does reorder some low-priority items that get folded together at a score of 0 (see completion-qualifiers.test).
Removed the exact sortText from the testcases, because it's the ranking that we want to test.

Reviewers: hokein

Subscribers: ilya-biryukov, cfe-commits

Differential Revision: https://reviews.llvm.org/D40089

llvm-svn: 318927
clang-tools-extra/clangd/ClangdUnit.cpp
clang-tools-extra/test/clangd/authority-less-uri.test
clang-tools-extra/test/clangd/completion-items-kinds.test
clang-tools-extra/test/clangd/completion-priorities.test
clang-tools-extra/test/clangd/completion-qualifiers.test
clang-tools-extra/test/clangd/completion-snippet.test
clang-tools-extra/test/clangd/completion.test
clang-tools-extra/test/clangd/protocol.test