Fix an incorrect note.

For the test case added to function-redecl.cpp, we were previously complaining
about a mismatch in the parameter types, since the definition used the
typedef'd type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138318 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index e45e7da..62032e8 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2924,7 +2924,7 @@
     QualType DefParamTy = Definition->getParamDecl(Idx)->getType();
 
     // The parameter types are identical
-    if (DefParamTy == DeclParamTy)
+    if (Context.hasSameType(DefParamTy, DeclParamTy))
       continue;
 
     QualType DeclParamBaseTy = getCoreType(DeclParamTy);
diff --git a/test/SemaCXX/function-redecl.cpp b/test/SemaCXX/function-redecl.cpp
index 2ea407c..b31e42e 100644
--- a/test/SemaCXX/function-redecl.cpp
+++ b/test/SemaCXX/function-redecl.cpp
@@ -54,3 +54,19 @@
 struct X { int f(); };
 struct Y : public X {};
 int Y::f() { return 3; } // expected-error {{out-of-line definition of 'f' does not match any declaration in 'Y'}}
+
+namespace test1 {
+struct Foo {
+  class Inner { };
+};
+}
+
+class Bar {
+  void f(test1::Foo::Inner foo) const; // expected-note {{member declaration nearly matches}}
+};
+
+using test1::Foo;
+
+void Bar::f(Foo::Inner foo) { // expected-error {{out-of-line definition of 'f' does not match any declaration in 'Bar'}}
+  (void)foo;
+}