aaron.ballman added a comment.

Thank you for this patch! You should also register the matcher(s) in 
Registry.cpp so that they'll work from clang-query. Also, you need to 
regenerate the documentation by running `clang\docs\tools\dump_ast_matchers.py`



================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4056
+///   matches [this](){};
+AST_MATCHER(LambdaExpr, capturesThis) {
+  for (const LambdaCapture &Capture : Node.captures()) {
----------------
I'm a bit less certain about the utility of this matcher. I would have assumed 
you could do `hasAnyCapture(cxxThisExpr())` to get the same behavior, but I am 
guessing that won't work -- though you may be able to add an overload to 
`hasAnyCapture()` to make that work. I think that might be a better approach, 
if it works.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72414



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

Reply via email to