[PATCH] D89296: [clangd] Implement call hierarchy (incoming calls)
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 25 11:36:07 PDT 2020
nridge created this revision.
Herald added subscribers: llvm-commits, cfe-commits, usaxena95, kadircet, arphaman, mgorny.
Herald added projects: clang, LLVM.
nridge retitled this revision from "[clangd] Implement call hierarchy (incoming callers)" to "[clangd] Implement call hierarchy (incoming calls)".
nridge updated this revision to Diff 298933.
nridge added a comment.
nridge updated this revision to Diff 300548.
nridge published this revision for review.
Herald added subscribers: MaskRay, ilya-biryukov.
- Rebased on top of upstream changes
- Rebased on top of TestWorkspace changes
- Merged D89298 <https://reviews.llvm.org/D89298> into this patch
- Split index changes out to D89670 <https://reviews.llvm.org/D89670>
- Added more tests
nridge added a comment.
Keeping in the draft state for now, as I still need to address this comment from the issue discussion <https://github.com/clangd/clangd/issues/162#issuecomment-708010771>:
> The request still has a progressToken attached to it, I presume(it is unclear from the spec) it is preserved between prepare and subsequent requests. So we can keep a mapping in ClangdServer and stash symbolIDs.
nridge added a comment.
Add and use CallHierarchyItem.data
nridge added a comment.
In D89296#2337788 <https://reviews.llvm.org/D89296#2337788>, @nridge wrote:
> Keeping in the draft state for now, as I still need to address this comment from the issue discussion <https://github.com/clangd/clangd/issues/162#issuecomment-708010771>:
>
>> The request still has a progressToken attached to it, I presume(it is unclear from the spec) it is preserved between prepare and subsequent requests. So we can keep a mapping in ClangdServer and stash symbolIDs.
The protocol has since been amended to introduce a `data` field to `CallHierarchyItem` in which we can stash the SymbolID, making this workaround unnecessary.
The updated patch uses the `data` field, and should be ready for review.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89296
Files:
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ClangdLSPServer.h
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/ClangdServer.h
clang-tools-extra/clangd/Protocol.cpp
clang-tools-extra/clangd/Protocol.h
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/XRefs.h
clang-tools-extra/clangd/test/initialize-params.test
clang-tools-extra/clangd/unittests/CMakeLists.txt
clang-tools-extra/clangd/unittests/CallHierarchyTests.cpp
clang-tools-extra/clangd/unittests/TestTU.cpp
llvm/utils/gn/secondary/clang-tools-extra/clangd/unittests/BUILD.gn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89296.300548.patch
Type: text/x-patch
Size: 31883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201025/50de3d11/attachment-0001.bin>
More information about the cfe-commits
mailing list