[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 10 18:06:42 PST 2021
njames93 added inline comments.
================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:333
Decls;
+ const Decl *CurrentlyProcessing = nullptr;
RelSet Flags;
----------------
Whats the purpose in tracking this? Is the Decls lookup not enough?
================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:361-364
+ for (const auto &D : Decls)
+ if (D.first == Dcl)
+ return true;
+ return false;
----------------
Couldn't this just be a map lookup?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94382/new/
https://reviews.llvm.org/D94382
More information about the cfe-commits
mailing list