[PATCH] D72414: Add new AST matcher `hasAnyCapture`

2020-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thank you! I have commit on your behalf in 4ffcec40acebae7161ac7426edc68290bbaca2b8 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D72414: Add new AST matcher `hasAnyCapture`

2020-01-10 Thread Reid via Phabricator via cfe-commits
rhiro added a comment. In D72414#1814831 , @aaron.ballman wrote: > LGTM! Do you need someone to commit on your behalf? Yes, please. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72414/new/ https://review

[PATCH] D72414: Add new AST matcher `hasAnyCapture`

2020-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Do you need someone to commit on your behalf? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72414/new/ https://reviews.llvm.

[PATCH] D72414: Add new AST matcher `hasAnyCapture`

2020-01-10 Thread Reid via Phabricator via cfe-commits
rhiro marked 2 inline comments as done. rhiro added a comment. I addressed the inline comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72414/new/ https://reviews.llvm.org/D72414 ___ cfe-commits

[PATCH] D72414: Add new AST matcher `hasAnyCapture`

2020-01-10 Thread Reid via Phabricator via cfe-commits
rhiro updated this revision to Diff 237389. rhiro added a comment. Fixed the condition for the varDecl case and made the cxxThisExpr more concise. - Condition on `capturesVariable` instead of `capturesThis` and switch the loop in the cxxThisExpr overload to use llvm::any_of instead of an explici

[PATCH] D72414: Add new AST matcher `hasAnyCapture`

2020-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4056 +/// matches [this](){}; +AST_MATCHER(LambdaExpr, capturesThis) { + for (const LambdaCapture &Capture : Node.captures()) { rhiro wrote: > aaron.ballman wrote: >