We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43efc6b commit 4fac50eCopy full SHA for 4fac50e
clang-tools-extra/clangd/FileDistance.cpp
@@ -196,11 +196,11 @@ static FileDistance createScopeFileDistance(ArrayRef<std::string> QueryScopes) {
196
// symbols in it, and there is pattern where using-namespace is used in
197
// place of enclosing namespaces (e.g. in implementation files).
198
if (S == Preferred)
199
- Param.Cost = S == "" ? 2 : 0;
+ Param.Cost = S == "" ? 4 : 0;
200
else if (Preferred.startswith(S) && !S.empty())
201
continue; // just rely on up-traversals.
202
else
203
- Param.Cost = S == "" ? 5 : 2;
+ Param.Cost = S == "" ? 6 : 2;
204
auto Path = scopeToPath(S);
205
// The global namespace is not 'near' its children.
206
Param.MaxUpTraversals = std::max(Path.second - 1, 0);
0 commit comments