[clang] [clang-tools-extra] [clang-tidy] Add readability-avoid-default-lambda-capture (PR #160150)
JJ Marr via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 4 08:23:58 PST 2025
jjmarr-amd wrote:
> I if we are speaking about passing lambda in-place, the easiest form would be lambdaExpr(IgnoreStdCalls ? unless(hasParent(callExpr(/*check function form std*/))) : anything()).bind("lambda"). https://godbolt.org/z/6dEeY1sjc
This is the first time I learned I could use godbolt to print the ast in that form. That would've made it easier to write the AST matchers. Until this point I've been making educated guesses. Let me take another stab at it.
https://github.com/llvm/llvm-project/pull/160150
More information about the cfe-commits
mailing list