[PATCH] D40089: [clangd] Make completion scores use 0-1 floats internally.

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D40089: [clangd] Make completion scores use 0-1 floats internally.

2017-11-23 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D40089: [clangd] Make completion scores use 0-1 floats internally.

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D40089: [clangd] Make completion scores use 0-1 floats internally.

2017-11-23 Thread Sam McCall via Phabricator via cfe-commits
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; --

[PATCH] D40089: [clangd] Make completion scores use 0-1 floats internally.

2017-11-17 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D40089: [clangd] Make completion scores use 0-1 floats internally.

2017-11-15 Thread Sam McCall via Phabricator via cfe-commits
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