[PATCH] D135536: [clangd] Hover: Only drop UsingDecl instead of BaseUsingDecl

Tom Praschan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 26 01:54:04 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd2135df4b5fb: [clangd] Hover: Only drop UsingDecl instead of BaseUsingDecl (authored by tom-anders).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135536/new/

https://reviews.llvm.org/D135536

Files:
  clang-tools-extra/clangd/Hover.cpp


Index: clang-tools-extra/clangd/Hover.cpp
===================================================================
--- clang-tools-extra/clangd/Hover.cpp
+++ clang-tools-extra/clangd/Hover.cpp
@@ -1017,7 +1017,7 @@
   // which isn't really useful for Hover. So use the other one,
   // which in this example would be the actual declaration of foo.
   if (Candidates.size() <= 2) {
-    if (llvm::isa<BaseUsingDecl>(Candidates.front()))
+    if (llvm::isa<UsingDecl>(Candidates.front()))
       return Candidates.back();
     return Candidates.front();
   }
@@ -1029,7 +1029,7 @@
   // we actually want to show the using declaration,
   // it's not clear which declaration to pick otherwise.
   auto BaseDecls = llvm::make_filter_range(Candidates, [](const NamedDecl *D) {
-    return llvm::isa<BaseUsingDecl>(D);
+    return llvm::isa<UsingDecl>(D);
   });
   if (std::distance(BaseDecls.begin(), BaseDecls.end()) == 1)
     return *BaseDecls.begin();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135536.470744.patch
Type: text/x-patch
Size: 947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221026/a7ac9ce8/attachment.bin>


More information about the cfe-commits mailing list