[PATCH] D69624: [clangd] Fix namespace aliases in findExplicitReferences
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 31 04:03:24 PDT 2019
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
In D69624#1728377 <https://reviews.llvm.org/D69624#1728377>, @kadircet wrote:
> As discussed offline, it might make more sense to fix this in `targetDecls` itself. Considering how the `Alias` is handled for typedefs and usings, it feels like this is a mistake for namespace aliases to be marked in that way.
I took another look and it appears the typedefs also have the `Alias` relation set. So `targetDecl` is consistent there and the current fix seems ok.
================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:893
+ void foo() {
+ $0^ns::$1^Type $2^a;
+ $3^alias::$4^Type $5^b;
----------------
kadircet wrote:
> nit: I suppose this line checks we are not regressing the "non-alias case", but they are already being tested in previous tests.
Yeah, that's just validating that non-aliases also work properly and that's definitely redundant.
I'll keep it as is, it doesn't seem to cause too much noise.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69624/new/
https://reviews.llvm.org/D69624
More information about the cfe-commits
mailing list