Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectionTree goes into implicit ShadowDecls #18

Closed
kadircet opened this issue Mar 1, 2019 · 2 comments
Closed

SelectionTree goes into implicit ShadowDecls #18

kadircet opened this issue Mar 1, 2019 · 2 comments

Comments

@kadircet
Copy link
Member

kadircet commented Mar 1, 2019

void foo(int);

namespace ns {
using ::f^oo;
};

This results in the following SelectionTree:

TranslationUnitDecl 
  NamespaceDecl namespace ns {
}
   .UsingDecl using ::foo
   .UsingShadowDecl

In which the using shadow decl should not reside. Since contract on selection tree is only for "visible" ast nodes, see https://github.com/llvm-mirror/clang-tools-extra/blob/master/clangd/Selection.h#L78.

@sam-mccall
Copy link
Member

Yeah I'd seen this. It's confusing and I'm not sure the behavior is right. However I'm also not sure I agree with the characterisation of ShadowDecl as implicit, so I don't think it's clear-cut.

@sam-mccall
Copy link
Member

This no longer reproduces. I think it was llvm/llvm-project@395fde7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants