================
@@ -179,3 +179,21 @@ void f() {
#endif
}
}
+
+namespace GH71976 {
+struct A {
+ int b = 5;
+ int foo() {
+ return [b = b]() { return b; }();
+ }
+};
+
+struct B {
+ int a;
+ void foo() {
+ auto b = [a = this->a] {
----------------
shafik wrote:
```suggestion
auto b = [a = this->a] { // no diagnostic, init-capture does not shadow a
```
https://github.com/llvm/llvm-project/pull/74512
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits