https://github.com/HerrCai0907 commented:
If it is bugprone, I think we should do more anlysis, e.g ensure this lambda is
not leak out of scope because of used as return value,...
It is common usage to use default capture like
```c++
template<class Fn> void forEach(Fn &&fn);
forEach([&]() {
// ...
};
```
We should not simply disable default capture as bug-prone here. IMO, bugprone
is the most critical check category.
Maybe put it in readability and add some comment / issue to move it back when
we support this kind of leak detection (I am not sure whether is it possible in
clang-tidy's scope)
https://github.com/llvm/llvm-project/pull/160150
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits