[clang-tools-extra] [clang-tidy] Add readability-default-lambda-capture (PR #160150)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 24 12:49:46 PDT 2025
https://github.com/vbvictor commented:
I personally find it not very useful to have a check to just prohibit part of the language without providing immediate fixits/some deeper analysis.
There are some ways to improve it:
- check what variables are used in lambda and provide fixit with actual variable names.
- check what variables are used in lambda and what variables are outside of lambda and don't warn if `[&]{}` is using all outside variables but warn if some variables are unused inside it.
This can be harder (don't know to what extent) to implement but beneficial overall
https://github.com/llvm/llvm-project/pull/160150
More information about the cfe-commits
mailing list