[PATCH] D48368: [clangd] Sema ranking tweaks: downrank keywords and injected names.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 27 02:11:50 PDT 2018


sammccall added a comment.

Added before/after



================
Comment at: clangd/Quality.cpp:160
+    case Keyword:  // Often relevant, but misses most signals.
+      Score *= 4;  // FIXME: important keywords should have specific boosts.
       break;
----------------
hokein wrote:
> I'm curious on how we choose these magic numbers, by experience?
Yeah, the constraint being satisfied here is boost(Keyword) < boost(FunctionScope) * boost(Variable)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D48368





More information about the cfe-commits mailing list