This is useful for symbo scope proximity, where down traversals from
the global scope if not desired.
Details
Details
Diff Detail
Diff Detail
- Repository
- rCTE Clang Tools Extra
Event Timeline
Comment Actions
Works for me! I think the code can be simplified slightly.
clangd/FileDistance.cpp | ||
---|---|---|
138 | I think this is more power than it needs to be... and in fact messes up the caching. if (KnownNode == RootHash && !Opts.AllowDownTraversalFromRoot && !Ancestors.empty()) Cost = Unreachable; should be enough. Or maybe even clearer, after line 126: if (Hash == RootHash && !Ancestors.empty() && !Opts.AllowDownTraversalFromRoot) { Cost = Unreachable; break; } then you never have to store KnownNode. |
I think this is more power than it needs to be... and in fact messes up the caching.
should be enough.
Or maybe even clearer, after line 126:
then you never have to store KnownNode.