This is an archive of the discontinued LLVM Phabricator instance.

[clangd] FindTarget: UsingEnumDecl is not an alias
ClosedPublic

Authored by sammccall on Oct 7 2022, 7:32 PM.

Details

Summary

Unlike UsingDecl it doesn't name the UsingShadowDecls it emits, so it doesn't
make sense to consider them the same thing. Don't consider the UsingEnumDecl
a target when the UsingShadowDecl is referenced.

Diff Detail

Event Timeline

sammccall created this revision.Oct 7 2022, 7:32 PM
sammccall requested review of this revision.Oct 7 2022, 7:32 PM
tom-anders accepted this revision.Oct 8 2022, 8:18 AM

lgtm, thanks! With this change in place, we could probably ajdust pickDeclToUse in Hover.cpp (introduced in https://reviews.llvm.org/D133664) to also check for UsingDecl instead of BaseUsingDecl, right?

This revision is now accepted and ready to land.Oct 8 2022, 8:18 AM

lgtm, thanks! With this change in place, we could probably ajdust pickDeclToUse in Hover.cpp (introduced in https://reviews.llvm.org/D133664) to also check for UsingDecl instead of BaseUsingDecl, right?

Yes, I think so!

This revision was automatically updated to reflect the committed changes.