Index: lib/Sema/SemaDecl.cpp =================================================================== --- lib/Sema/SemaDecl.cpp +++ lib/Sema/SemaDecl.cpp @@ -6406,6 +6406,11 @@ } } + // Don't warn on constructor parameters with the same name as a field name. + if (isa(ShadowedDecl) && isa(NewDC) && + isa(D)) + return; + DeclContext *OldDC = ShadowedDecl->getDeclContext(); // Only warn about certain kinds of shadowing for class members. Index: test/SemaCXX/warn-shadow.cpp =================================================================== --- test/SemaCXX/warn-shadow.cpp +++ test/SemaCXX/warn-shadow.cpp @@ -71,6 +71,14 @@ }; } +// http://llvm.org/PR16088 +namespace PR16088 { +struct S { + int i; + S(int i) : i(i) {} +}; +} + extern int bob; // expected-note {{previous declaration is here}} // rdar://8883302