[PATCH] D48441: [clangd] Incorporate transitive #includes into code complete proximity scoring.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 21 09:26:55 PDT 2018
sammccall created this revision.
sammccall added a reviewer: ioeric.
Herald added subscribers: cfe-commits, jkorous, MaskRay, ilya-biryukov, mgorny.
We now compute a distance from the main file to the symbol header, which
is a weighted count of:
- some number of #include traversals from source file --> included file
- some number of FS traversals from file --> parent directory
- some number of FS traversals from parent directory --> child file/dir
This calculation is performed in the appropriate URI scheme.
This means we'll get some proximity boost from header files in main-file
contexts, even when these are in different directory trees.
This extended file proximity model is not yet incorporated in the index
interface/implementation.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48441
Files:
clangd/CMakeLists.txt
clangd/ClangdServer.cpp
clangd/ClangdUnit.cpp
clangd/ClangdUnit.h
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/FileDistance.cpp
clangd/FileDistance.h
clangd/Headers.cpp
clangd/Headers.h
clangd/Quality.cpp
clangd/Quality.h
clangd/XRefs.cpp
unittests/clangd/CMakeLists.txt
unittests/clangd/FileDistanceTests.cpp
unittests/clangd/HeadersTests.cpp
unittests/clangd/QualityTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48441.152323.patch
Type: text/x-patch
Size: 48319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180621/69dc6a4a/attachment-0001.bin>
More information about the cfe-commits
mailing list