Fznamznon wrote: > Should we still emit shadowing warning in case lambda captured this and has > an init-capture with the same name as a class field? Yes, we should probably do that.
I'm struggling with detecting the following case: ``` struct A { int b = 5; int foo() { return [b = b, this]() { return b; }(); } }; ``` Since init capture is checked for shadowing before this capture reached, lambda info doesn't yet know about incoming this capture. https://github.com/llvm/llvm-project/pull/74512 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits