diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/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; }