nridge marked an inline comment as done.
nridge added inline comments.

================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:333
       Decls;
+  const Decl *CurrentlyProcessing = nullptr;
   RelSet Flags;
----------------
njames93 wrote:
> Whats the purpose in tracking this? Is the Decls lookup not enough?
No, because the possibly-recursive call is 
[here](https://searchfox.org/llvm/rev/9f2d9364b04c4d9651b1ec8612a3968b969fe71d/clang-tools-extra/clangd/FindTarget.cpp#366),
 but we only insert into `Decls` 
[here](https://searchfox.org/llvm/rev/9f2d9364b04c4d9651b1ec8612a3968b969fe71d/clang-tools-extra/clangd/FindTarget.cpp#417).


================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:361-364
+    for (const auto &D : Decls)
+      if (D.first == Dcl)
+        return true;
+    return false;
----------------
njames93 wrote:
> Couldn't this just be a map lookup?
Yup, good point!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94382/new/

https://reviews.llvm.org/D94382

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to