brunodf-gf wrote:

Careful, I think this fix drops some true-positive -Wshadow warnings as well. 
Consider this:

```
struct Foo {
  int a;
  int x = [this] {
    int a = 0;            // shadows Foo::a
    return a;
  }();
};
```

Currently we give a warning about this: https://godbolt.org/z/9xsedberW
When I test this PR, the warning is gone.

https://github.com/llvm/llvm-project/pull/221249
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to