diff options
| author | Russell Gallop <russell.gallop@gmail.com> | 2019-07-12 13:35:58 +0000 |
|---|---|---|
| committer | Russell Gallop <russell.gallop@gmail.com> | 2019-07-12 13:35:58 +0000 |
| commit | de54e2c4df98f725e9ef9f4885cf2fe136ef2956 (patch) | |
| tree | 1dcdbdf3dd00af04399d3d224718b1f696d10ec9 /clang-tools-extra/clangd/XRefs.cpp | |
| parent | e6e09561698a16b30d610a0690a43cd975f9bb2a (diff) | |
| download | bcm5719-llvm-de54e2c4df98f725e9ef9f4885cf2fe136ef2956.tar.gz bcm5719-llvm-de54e2c4df98f725e9ef9f4885cf2fe136ef2956.zip | |
Revert "[clangd] Implement typeHierarchy/resolve for subtypes"
Causing test failure on Windows bot
This reverts commit 5b9484e559d44bd923fc290e335891b1dd2e17c4.
llvm-svn: 365899
Diffstat (limited to 'clang-tools-extra/clangd/XRefs.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/XRefs.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index 59f07ee405e..1d34499b36e 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -893,7 +893,7 @@ llvm::Optional<QualType> getDeducedType(ParsedAST &AST, /// Retrieves the deduced type at a given location (auto, decltype). bool hasDeducedType(ParsedAST &AST, SourceLocation SourceLocationBeg) { - return (bool)getDeducedType(AST, SourceLocationBeg); + return (bool) getDeducedType(AST, SourceLocationBeg); } llvm::Optional<HoverInfo> getHover(ParsedAST &AST, Position Pos, @@ -1104,10 +1104,6 @@ symbolToTypeHierarchyItem(const Symbol &S, const SymbolIndex *Index, // (https://github.com/clangd/clangd/issues/59). THI.range = THI.selectionRange; THI.uri = Loc->uri; - // Store the SymbolID in the 'data' field. The client will - // send this back in typeHierarchy/resolve, allowing us to - // continue resolving additional levels of the type hierarchy. - THI.data = S.ID.str(); return std::move(THI); } @@ -1251,25 +1247,6 @@ getTypeHierarchy(ParsedAST &AST, Position Pos, int ResolveLevels, return Result; } -void resolveTypeHierarchy(TypeHierarchyItem &Item, int ResolveLevels, - TypeHierarchyDirection Direction, - const SymbolIndex *Index) { - // We only support typeHierarchy/resolve for children, because for parents - // we ignore ResolveLevels and return all levels of parents eagerly. - if (Direction == TypeHierarchyDirection::Parents || ResolveLevels == 0) - return; - - Item.children.emplace(); - - if (Index && Item.data) { - // We store the item's SymbolID in the 'data' field, and the client - // passes it back to us in typeHierarchy/resolve. - if (Expected<SymbolID> ID = SymbolID::fromStr(*Item.data)) { - fillSubTypes(*ID, *Item.children, Index, ResolveLevels, Item.uri.file()); - } - } -} - FormattedString HoverInfo::present() const { FormattedString Output; if (NamespaceScope) { |

