Because lambda will create its own scope, so we shouldn't consider variables
defined with the same name as redefinition error, if the new one is in a
lambda.
After this patch, clang is supposed to accept code below:
void foo() {
for (int x = [] { int x = 0; return x; }(); ;) ;
}
I think this isn't accurate, right? I thought this had to do with lambdas alone? Is the following accurate?
`Clang should no longer incorrectly diagnose a variable declaration inside of a lambda expression inside the scope of a if/while/for/switch init statement as a redeclaration. This fixes ...'.