Issue 131116
Summary -Wshadow doesn't report shadowing inside lambdas
Labels new issue
Assignees
Reporter shtanko-sv
    I'm not sure to be honest if it's actually an issue, but behavior is different between GCC and Clang. Sample snippet with shadowing `i`:

```cpp
int foo(int i) {
    return [](int k) mutable {
 for (int i = 0; i < 10; ++i) k += i;
        return k;
 }(i);
}
```

See Compiler Explorer: https://godbolt.org/z/9xn7E1vKr
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to