[PATCH] D135536: [clangd] Hover: Only drop UsingDecl instead of BaseUsingDecl
Tom Praschan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 9 03:20:18 PDT 2022
tom-anders created this revision.
tom-anders added a reviewer: sammccall.
Herald added subscribers: kadircet, arphaman.
Herald added a project: All.
tom-anders requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
Since https://reviews.llvm.org/D135506 it's sufficient to only drop UsingDecl here
Repository:
rG LLVM Github Monorepo
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.466362.patch
Type: text/x-patch
Size: 947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221009/5dbe4476/attachment.bin>
More information about the cfe-commits
mailing list