steveire added a comment.

I'm not certain what strong opinions I've voiced on the mailing list about 
that. Was it just that I think `hasDescendant` can lead to unexpected matches 
and a more-specific matcher should always be used when available (such as 
`hasArgument`)? I do think `has`, `hasDescendant`, `hasAncestor` etc have their 
uses and they get more useful with utilities like `forFunction`.

I don't know anything about objc. Is it possible to have callable decls nested 
within each other, like in c++? Is it common? `forFunction` is mostly useful 
for the very common case of lambdas within functions.

Does it make sense to add an overload for `LambdaExpr` so that you can write 
`forCallable(lambdaExpr())`?

Is there a missing test for `forFunction(functionDecl())`?


Repository:
  rC Clang

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

https://reviews.llvm.org/D102213

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to