This revision was automatically updated to reflect the committed changes.
Closed by commit rG4718ec01669b: [clangd] Avoid recursion in
TargetFinder::add() (authored by nridge).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94382/new/
https://reviews
nridge updated this revision to Diff 316000.
nridge added a comment.
Address review comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94382/new/
https://reviews.llvm.org/D94382
Files:
clang-tools-extra/clangd/FindTarget.cpp
clang-tools-ex
sammccall added a comment.
Doh, I really thought we'd get away without an explicit recursion guard here.
But the example is compelling, so this seems like the right approach.
Unfortunately, I think we're going to end up needing to add allocations too...
Comment at: clang-tools
nridge added inline comments.
Comment at: clang-tools-extra/clangd/FindTarget.cpp:379
if (const TypedefNameDecl *TND = dyn_cast(D)) {
add(TND->getUnderlyingType(), Flags | Rel::Underlying);
Flags |= Rel::Alias; // continue with the alias.
kadir
kadircet added a comment.
oh and also thanks a lot for all the investigation and fix of the issue!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94382/new/
https://reviews.llvm.org/D94382
___
cfe-commits
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/FindTarget.cpp:379
if (const TypedefNameDecl *TND = dyn_cast(D)) {
add(TND->getUnderlyingType(), Flags | Rel::Underlying);
Flags |= Rel::Alias; // continue with the alias.
rat
nridge updated this revision to Diff 315689.
nridge marked an inline comment as done.
nridge added a comment.
Use map lookup instead of iteration
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94382/new/
https://reviews.llvm.org/D94382
Files:
cla
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 th
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: