This revision was automatically updated to reflect the committed changes.
Closed by commit rG512aa8485010: [clangd] Handle members of anon structs in
SelectionTree (authored by kadircet).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110825/new/
htt
kadircet updated this revision to Diff 376445.
kadircet marked 2 inline comments as done.
kadircet added a comment.
- update comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110825/new/
https://reviews.llvm.org/D110825
Files:
clang-tools-e
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Thanks!
Comment at: clang-tools-extra/clangd/Selection.cpp:446
return true;
+ // Make sure anonymous structs don't end up owning tokens.
+ if (auto *ME = llvm:
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/Selection.cpp:443
// It would be nice if RAV handled this (!shouldTraverseImplicitCode()).
if (auto *CTI = llvm::dyn_cast(S))
if (CTI->isImplicit())
sammccall wrote:
> kadircet wrote:
kadircet updated this revision to Diff 376238.
kadircet marked 4 inline comments as done.
kadircet added a comment.
- Use `isImplicit` rather than `earlyClaim`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110825/new/
https://reviews.llvm.org/D1108
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:368
+TEST(LocateSymbol, AnonymousStructFields) {
+ auto Code = Annotations(R"cpp(
kadircet wrote:
> sammccall wrote:
> > This example is quite complicated to the poi
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/Selection.cpp:443
// It would be nice if RAV handled this (!shouldTraverseImplicitCode()).
if (auto *CTI = llvm::dyn_cast(S))
if (CTI->isImplicit())
kadircet wrote:
> sammccall wrote
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/Selection.cpp:443
// It would be nice if RAV handled this (!shouldTraverseImplicitCode()).
if (auto *CTI = llvm::dyn_cast(S))
if (CTI->isImplicit())
sammccall wrote:
> seems like it'd
sammccall added a comment.
Thanks for fixing!
Early-claim is a blunt hammer and I'm always dreading side-effects.
This also feels a *lot* like implicit-this which is handled in another way.
So that seems worth a shot, but this approach is fine if that one doesn't work.
Commen
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/Selection.cpp:745
+ if (auto *FD = llvm::dyn_cast(ME->getMemberDecl())) {
+if (FD->getParent()->isAnonymousStructOrUnion())
+ return SourceRange(ME->getMemberLoc(), ME->getEndLoc());
--
kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: usaxena95, arphaman.
kadircet requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
References to fields inside ano
11 matches
Mail list logo