================ @@ -179,3 +179,21 @@ void f() { #endif } } + +namespace GH71976 { +struct A { + int b = 5; + int foo() { + return [b = b]() { return b; }(); ---------------- shafik wrote:
```suggestion return [b = b]() { return b; }(); // no diagnostic, init-capture does not shadow b ``` 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