[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()

2021-01-12 Thread Nathan Ridge via Phabricator via cfe-commits
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

[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()

2021-01-11 Thread Nathan Ridge via Phabricator via cfe-commits
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

[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()

2021-01-11 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()

2021-01-10 Thread Nathan Ridge via Phabricator via cfe-commits
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

[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()

2021-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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

[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()

2021-01-10 Thread Kadir Cetinkaya via Phabricator via 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

[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()

2021-01-10 Thread Nathan Ridge via Phabricator via cfe-commits
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

[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()

2021-01-10 Thread Nathan Ridge via Phabricator via cfe-commits
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

[PATCH] D94382: [clangd] Avoid recursion in TargetFinder::add()

2021-01-10 Thread Nathan James via Phabricator via cfe-commits
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: