This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE347548: [clangd] Tune down scope boost for global scope 
(authored by ioeric, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D54851?vs=175106&id=175226#toc

Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D54851

Files:
  clangd/FileDistance.cpp


Index: clangd/FileDistance.cpp
===================================================================
--- clangd/FileDistance.cpp
+++ clangd/FileDistance.cpp
@@ -196,11 +196,11 @@
     // symbols in it, and there is pattern where using-namespace is used in
     // place of enclosing namespaces (e.g. in implementation files).
     if (S == Preferred)
-      Param.Cost = S == "" ? 2 : 0;
+      Param.Cost = S == "" ? 4 : 0;
     else if (Preferred.startswith(S) && !S.empty())
       continue; // just rely on up-traversals.
     else
-      Param.Cost = S == "" ? 5 : 2;
+      Param.Cost = S == "" ? 6 : 2;
     auto Path = scopeToPath(S);
     // The global namespace is not 'near' its children.
     Param.MaxUpTraversals = std::max(Path.second - 1, 0);


Index: clangd/FileDistance.cpp
===================================================================
--- clangd/FileDistance.cpp
+++ clangd/FileDistance.cpp
@@ -196,11 +196,11 @@
     // symbols in it, and there is pattern where using-namespace is used in
     // place of enclosing namespaces (e.g. in implementation files).
     if (S == Preferred)
-      Param.Cost = S == "" ? 2 : 0;
+      Param.Cost = S == "" ? 4 : 0;
     else if (Preferred.startswith(S) && !S.empty())
       continue; // just rely on up-traversals.
     else
-      Param.Cost = S == "" ? 5 : 2;
+      Param.Cost = S == "" ? 6 : 2;
     auto Path = scopeToPath(S);
     // The global namespace is not 'near' its children.
     Param.MaxUpTraversals = std::max(Path.second - 1, 0);
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to