[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 9 08:33:08 PST 2019
steveire added a comment.
In D56444#1351247 <https://reviews.llvm.org/D56444#1351247>, @sammccall wrote:
> In D56444#1351174 <https://reviews.llvm.org/D56444#1351174>, @steveire wrote:
>
> > Yes - don't use RAV to traverse parents when AST-matching.
>
>
> OK, this is certainly a much more invasive change, and isn't going to make the release.
> I understand that you don't think this crash is worth fixing for 8.0, while others disagree.
Actually, I was trying to explain what can come in the future in response to a question, but I replied with a stronger-looking opinion than I intended.
I don't mind a non-invasive change like this going in now/soon, but I oppose more-drastic changes right now.
> However, such nodes are very easy to reach, inside or outside of a matcher.
> e.g. `callExpr(callee(functionDecl()))` will match a lambda call, and "func" will be the `operator()`.
> Having such nodes then not work with parent/ancestor matchers seems surprising and not **obviously** the best design choice (vs e.g. visiting all nodes including implicit, or breaking symmetry between downward and upward traversal).
I believe I have a solution to this, but this is not the place to discuss it. We can discuss it when I propose that patch :). I'll be sure to add you to the review.
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