[clang] [clang-tools-extra] [clang-tidy] Add readability-avoid-default-lambda-capture (PR #160150)
Denis Mikhailov via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 16 08:44:03 PST 2025
denzor200 wrote:
I think think this check should have an option to not warning with STL algorithms:
```
auto found =
std::find_if(from.begin(), from.end(), [&](const Clause &c) { return c.id == clause_id; }); // OK
```
I do respect Scott Meyers' recommendations, but in practise that lambda in `find_if` never harm, so warning to change it to not use default capture will be too noisy
https://github.com/llvm/llvm-project/pull/160150
More information about the cfe-commits
mailing list