This revision was automatically updated to reflect the committed changes.
Closed by commit rL318927: [clangd] Make completion scores use 0-1 floats
internally. (authored by sammccall).
Changed prior to commit:
https://reviews.llvm.org/D40089?vs=124044&id=124099#toc
Repository:
rL LLVM
https
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: clangd/ClangdUnit.cpp:425
+const uint32_t SignBit = ~(~uint32_t{0} >> 1);
+return U & SignBit ? 0 - U : U + SignBit;
+ }
sammccall
sammccall updated this revision to Diff 124044.
sammccall marked 3 inline comments as done.
sammccall added a comment.
address review comments
https://reviews.llvm.org/D40089
Files:
clangd/ClangdUnit.cpp
test/clangd/authority-less-uri.test
test/clangd/completion-items-kinds.test
test/cl
sammccall marked 4 inline comments as done.
sammccall added a comment.
Thanks for the quick review, took me a while to get back to this but I do care
about it!
Comment at: clangd/ClangdUnit.cpp:387
std::string sortText() const {
std::string S, NameStorage;
--
hokein added a comment.
A few comments based on our discussion.
Comment at: clangd/ClangdUnit.cpp:387
std::string sortText() const {
std::string S, NameStorage;
example
Comment at: clangd/ClangdUnit.cpp:416
+
+ // Produces an integ
sammccall created this revision.
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, be