[PATCH] D95812: [clangd] Report only decl of overridding method in xref.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 1 23:43:27 PST 2021
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Thanks, this looks great.
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:1387
+ if (auto LSPLoc =
+ toLSPLocation(Object.CanonicalDeclaration, *MainFilePath)) {
+ ReferencesResult::Reference Result;
----------------
I guess we should include the definition location as well?
================
Comment at: clang-tools-extra/clangd/XRefs.h:86
Definition = 1 << 1,
+ OverriddenBy = 1 << 2,
};
----------------
nit: add some doc, I'd just name it `override` as this field indicates this is an occurrence overrides the base method.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95812/new/
https://reviews.llvm.org/D95812
More information about the cfe-commits
mailing list