You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespacex {
structS {};
}
namespacey {
using x::S; // equivalent to `using S = x::S`voidf() {
S{}; y::S{};
}
}
The question is what should Go to Definition behave like when:
Trying GTD from S{}
Trying GTD from y::S{}
In both cases, GTD in VS Code/clangd shows both the struct and using lines. In CLion, both go directly to the struct line.
As it stands, scip-clang will emit a reference to y::S and take one to the using line directly. While this is technically correct, attempting Go to Definition to the using line doesn't do anything (even though there is a reference to x::S). Example in LLVM:
For now, I think we should just emit a reference to the canonical declaration directly. If we add support for some kind of alias role, then we can also emit a definition for the alias declaration.
The text was updated successfully, but these errors were encountered:
We should also do this for declarations inside templates, which currently don't have any occurrence (definition or reference), see the test case added in #321
Say I have code like the following:
The question is what should Go to Definition behave like when:
In both cases, GTD in VS Code/clangd shows both the
struct
andusing
lines. In CLion, both go directly to thestruct
line.As it stands, scip-clang will emit a reference to
y::S
and take one to theusing
line directly. While this is technically correct, attempting Go to Definition to theusing
line doesn't do anything (even though there is a reference tox::S
). Example in LLVM:For now, I think we should just emit a reference to the canonical declaration directly. If we add support for some kind of alias role, then we can also emit a definition for the alias declaration.
The text was updated successfully, but these errors were encountered: