[PATCH] D96113: [ASTMatchers] Fix hasParent while ignoring unwritten nodes
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 18 06:45:25 PST 2021
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
In D96113#2569441 <https://reviews.llvm.org/D96113#2569441>, @steveire wrote:
> Update
Thanks for the extra context, that's useful -- LGTM!
================
Comment at: clang/lib/AST/ParentMapContext.cpp:174
+ {
+ auto AncestorNodes = matchParents<VarDecl, DeclStmt, CXXForRangeStmt>(
+ ParentList, this);
----------------
steveire wrote:
> aaron.ballman wrote:
> > Not needing to be solved in this patch, but do we eventually need to do something for `ObjCForCollectionStmt` the same as we do for `CXXForRangeStmt`?
> Perhaps. I'm not familiar with it.
I'm not super familiar with it myself, but I know it uses `for (element in expression)` as the syntax which seems awfully similar to `for (auto decl : expr)` in C++ which is why I thought of it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96113/new/
https://reviews.llvm.org/D96113
More information about the cfe-commits
mailing list