| Issue |
163731
|
| Summary |
[Clang] Lambda parameter shadowing a field while using explicit object parameter
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
exdal
|
```c++
struct Foo {
int bar;
void func(this Foo &self) {
auto lambda = [](int bar) {
return bar;
};
}
};
```
```c++
<source>:5:30: warning: declaration shadows a field of 'Foo' [-Wshadow-uncaptured-local]
5 | auto lambda = [](int bar) {
| ^
<source>:2:9: note: previous declaration is here
2 | int bar;
| ^
```
https://godbolt.org/z/d7vjvP79q
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs