diff options
author | Sam McCall <sam.mccall@gmail.com> | 2018-10-24 13:51:44 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2018-10-24 13:51:44 +0000 |
commit | e8437cbf5e9c41c27da6be13996963529c8ca1bf (patch) | |
tree | 289e7cab926b88dc6691ef93958397aadae0ccf4 /clang-tools-extra/clangd/CodeComplete.cpp | |
parent | 52a11b5662eb3575e4324be45c33b3131c766c65 (diff) | |
download | bcm5719-llvm-e8437cbf5e9c41c27da6be13996963529c8ca1bf.tar.gz bcm5719-llvm-e8437cbf5e9c41c27da6be13996963529c8ca1bf.zip |
[clangd] Don't show base class versions of members as completions.
Summary:
These are available via qualifiers, but signal to noise level is low.
Keep required quailifier machinery around though, for cross-ns completion.
Reviewers: ioeric
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D53571
llvm-svn: 345141
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.cpp')
-rw-r--r-- | clang-tools-extra/clangd/CodeComplete.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp index 8eb690d5f4e..819cd6b3ce2 100644 --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -728,9 +728,9 @@ struct CompletionRecorder : public CodeCompleteConsumer { // Retain the results we might want. for (unsigned I = 0; I < NumResults; ++I) { auto &Result = InResults[I]; - // Drop hidden items which cannot be found by lookup after completion. - // Exception: some items can be named by using a qualifier. - if (Result.Hidden && (!Result.Qualifier || Result.QualifierIsInformative)) + // Class members that are shadowed by subclasses are usually noise. + if (Result.Hidden && Result.Declaration && + Result.Declaration->isCXXClassMember()) continue; if (!Opts.IncludeIneligibleResults && (Result.Availability == CXAvailability_NotAvailable || |