[PATCH] D79500: [clangd] Refactor code completion signal's utility properties.
UTKARSH SAXENA via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 8 03:43:22 PDT 2020
usaxena95 updated this revision to Diff 262852.
usaxena95 added a comment.
- Added DerivedSignals struct containing all the derived signals.
- Added NameMatchesContext and proximtiy signals to this struct.
- We need to call computeDerivedSignals() before calling evaluate() if we set non-concrete utilites (e.g. ContextWords and Name).
- This is logically equivalent to the previous version (both when the utilites are explicitly set and when the default signals are used).
- The utilites are not marked as null in computeDerivedSignals. This is due to 2 reasons:
- Current scoring function checks whether `ScopeProximityMatch` is set or not to decide whether to multiply with scopeProxitiyScore. Possible solutions:
- Have scopeProxitiyScore as a derived signal itself.
- Or have a different derived signal `HasScopeProximityMatch`.
- Having these utilities available for debug purposes is great. We can try to compute other derived signals (e.g. ContextMatchesName) and test out it's value without even adding them concretely to clangd. Once their value is justified, we can add it to Quality/Relevance signals.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79500/new/
https://reviews.llvm.org/D79500
Files:
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/FindSymbols.cpp
clang-tools-extra/clangd/Quality.cpp
clang-tools-extra/clangd/Quality.h
clang-tools-extra/clangd/Quality.h.rej
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/index/dex/Dex.cpp
clang-tools-extra/clangd/unittests/QualityTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79500.262852.patch
Type: text/x-patch
Size: 13984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200508/6dfdde91/attachment-0001.bin>
More information about the cfe-commits
mailing list