[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
Wed Oct 15 13:53:39 PDT 2025
================
@@ -0,0 +1,57 @@
+.. title:: clang-tidy - readability-avoid-default-lambda-capture
+
+readability-avoid-default-lambda-capture
+========================================
+
+Warns on default lambda captures (e.g. ``[&](){ ... }``, ``[=](){ ... }``).
----------------
vbvictor wrote:
We can, but I think it's better to keep it as is because most users probably more familiar with `[](){}` syntax rather than `[]{}`
https://github.com/llvm/llvm-project/pull/160150
More information about the cfe-commits
mailing list