[PATCH] D81845: [clangd] Support typeHierarchy/resolve for children of parents as well
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 15 09:13:41 PDT 2020
nridge updated this revision to Diff 270769.
nridge added a comment.
Address nit
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81845/new/
https://reviews.llvm.org/D81845
Files:
clang-tools-extra/clangd/XRefs.cpp
Index: clang-tools-extra/clangd/XRefs.cpp
===================================================================
--- clang-tools-extra/clangd/XRefs.cpp
+++ clang-tools-extra/clangd/XRefs.cpp
@@ -1225,6 +1225,14 @@
THI.uri = URIForFile::canonicalize(*FilePath, *TUPath);
+ // Compute the SymbolID and store it in the 'data' field.
+ // This allows typeHierarchy/resolve to be used to
+ // resolve children of items returned in a previous request
+ // for parents.
+ if (auto ID = getSymbolID(&ND)) {
+ THI.data = ID->str();
+ }
+
return THI;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81845.270769.patch
Type: text/x-patch
Size: 562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200615/85260f84/attachment.bin>
More information about the cfe-commits
mailing list