[PATCH] D88281: [clangd] Use Decision Forest to score code compeltions.

Adam Czachorowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 06:45:20 PDT 2020


adamcz accepted this revision.
adamcz added inline comments.


================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1635
+    case RM::Heuristics:
+      Scores.Quality = Quality.evaluate();
+      Scores.Relevance = Relevance.evaluate();
----------------
usaxena95 wrote:
> adamcz wrote:
> > Ideally we'd rename the evaluate() here, since SymbolQualitySignals is used for both heuristic and DecisionForest version, but evaluate is heuristic-specific. I think in pefect world this would be out of SymbolQualitySignals class (which would become just storage), but at least it should be renamed to evaluateUsingHeuristic().
> Right. I plan to do this but the changes for a rename would include unrelated files. So I planed to do this another patch keeping this one tractable and clean.
> Let me know if you want me to do it in this one itself.
Separate change sounds good.


================
Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:185
+    cat(Features),
+    desc("Base for exponentiating the prediction from DecsionForest."),
+    init(CodeCompleteOptions().DecisionForestBase),
----------------
typo: Decsion


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88281/new/

https://reviews.llvm.org/D88281



More information about the cfe-commits mailing list