[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 9 07:18:45 PST 2019


sammccall added a comment.

In D56444#1351130 <https://reviews.llvm.org/D56444#1351130>, @steveire wrote:

> In D56444#1351125 <https://reviews.llvm.org/D56444#1351125>, @aaron.ballman wrote:
>
> > if the location isn't somewhere in user code, then don't consider the node or its children for traversal. However, that may be insufficient and equally as mysterious behavior.
>
>
> That is exactly what I've implemented. I skip invisible nodes in matching and dumping: http://ec2-18-191-7-3.us-east-2.compute.amazonaws.com:10240/z/EuYjAn


So what happens when someone asks about the parent of an invisible node?

e.g. `match(hasParent(decl().bind("parent")), X, Ctx)` where X is the `operator()` function of a lambda class. (This is basically the case in the bug that this patch fixes)


Repository:
  rC Clang

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

https://reviews.llvm.org/D56444





More information about the cfe-commits mailing list