diff options
Diffstat (limited to 'clang-tools-extra/clangd/FileDistance.cpp')
-rw-r--r-- | clang-tools-extra/clangd/FileDistance.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/FileDistance.cpp b/clang-tools-extra/clangd/FileDistance.cpp index 14581468473..6bd73e526c3 100644 --- a/clang-tools-extra/clangd/FileDistance.cpp +++ b/clang-tools-extra/clangd/FileDistance.cpp @@ -196,11 +196,11 @@ static FileDistance createScopeFileDistance(ArrayRef<std::string> QueryScopes) { // 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); |