[clang] [clang-tools-extra] [clang-tidy] Add readability-avoid-default-lambda-capture (PR #160150)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 20 23:51:50 PST 2025
================
@@ -5125,6 +5125,20 @@ AST_MATCHER_P(LambdaCapture, capturesVar, internal::Matcher<ValueDecl>,
/// matches `[this]() { return cc; }`.
AST_MATCHER(LambdaCapture, capturesThis) { return Node.capturesThis(); }
+/// Matches lambda expressions that have default capture modes.
----------------
vbvictor wrote:
Please run ‎clang/docs/tools/dump_ast_matchers.py to update docs
https://github.com/llvm/llvm-project/pull/160150
More information about the cfe-commits
mailing list