[clangd] Tune macro quality scoring for code completion.
authorEric Liu <ioeric@google.com>
Wed, 5 Sep 2018 07:40:38 +0000 (07:40 +0000)
committerEric Liu <ioeric@google.com>
Wed, 5 Sep 2018 07:40:38 +0000 (07:40 +0000)
x0.2 seems to be too much penalty, macros might be wanted in some cases;
changing to 0.5x instead. The tuning didn't affect ranking for non-macro
completions.

llvm-svn: 341449

clang-tools-extra/clangd/Quality.cpp

index 5a9fcd2..7e0e837 100644 (file)
@@ -221,7 +221,7 @@ float SymbolQualitySignals::evaluate() const {
     Score *= 0.8f;
     break;
   case Macro:
-    Score *= 0.2f;
+    Score *= 0.5f;
     break;
   case Unknown:
   case Constructor: // No boost constructors so they are after class types.