Fixes http://llvm.org/PR33947.
void f(int a) {
struct A { void g(int a) {} A() { int a; } };
}
3 : <source>:3:16: warning: declaration shadows a local variable [-Wshadow]
void g(int a) {} ^
1 : <source>:1:12: note: previous declaration is here
void f(int a) {
^
4 : <source>:4:15: warning: declaration shadows a local variable [-Wshadow]
A() { int a; } ^
1 : <source>:1:12: note: previous declaration is here
void f(int a) {
^
2 warnings generated.
The local variable a of the function f can't be accessed from a method of
the function-local class A, thus no shadowing occurs and no diagnostic is
needed.