[PATCH] D139998: [clangd] Remove ReferenceFinder::Reference::Target
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 16 02:03:57 PST 2022
kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.
thanks, lgtm!
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:871
for (const NamedDecl *ND : Targets) {
const Decl *CD = ND->getCanonicalDecl();
+ TargetDecls.insert(CD);
----------------
nit: `TargetDecls.insert(ND->getCanonicalDecl())` directly, and drop the braces.
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:899
index::IndexDataConsumer::ASTNodeInfo ASTNode) override {
- auto DeclID = TargetDeclToID.find(D->getCanonicalDecl());
- if (DeclID == TargetDeclToID.end())
+ if (TargetDecls.find(D->getCanonicalDecl()) == TargetDecls.end())
return true;
----------------
nit: `if (!TargetDecls.contains(D->getCanonicalDecl())`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139998/new/
https://reviews.llvm.org/D139998
More information about the cfe-commits
mailing list