[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:16:48 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7759f70fb0ee: [clangd] Support typeHierarchy/resolve for children of parents as well (authored by nridge).

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.270775.patch
Type: text/x-patch
Size: 562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200615/e2709050/attachment.bin>


More information about the cfe-commits mailing list