jcsxky wrote:

> I agree to fix false positive reported in #68105. But for capturing in lambda 
> be reference and do forward in lambda, It is just like create a record by ref 
> instead of using forward and do forward in some member function. I don't 
> think it is an expected false positive.
> 
> ```c++
> template<typename T>
> void lambda_value_reference_capture_list_ref_2(T&& t) {
>     [&t] { T other = std::forward<T>(t); };
> }
> ```
> 
> @jcsxky @PiotrZSL Could you think again about this PR?

Not really. Capture by reference makes `t` in parameter same with it in lambda 
body. Maybe you can check 
https://github.com/llvm/llvm-project/issues/68105#issuecomment-1874796188 .












https://github.com/llvm/llvm-project/pull/77056
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to