Match type names and give more info for out-of-line function definition errors.

Having a function declaration and definition with different types for a
parameter where the types have same (textual) name can occur when an unqualified
type name resolves to types in different namespaces in each location.

The error messages have been extended by adding notes that point to the first
parameter of the function definition that doesn't match the declaration, instead
of a generic "member declaration nearly matches". The generic message is still
used in cases where the mismatch is not in the paramenter list, such as
mismatched cv qualifiers on the member function itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136891 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp
index ee6ca88..8e73c3e 100644
--- a/test/SemaCXX/nested-name-spec.cpp
+++ b/test/SemaCXX/nested-name-spec.cpp
@@ -29,7 +29,7 @@
 class C2 {
   void m(); // expected-note{{member declaration nearly matches}}
 
-  void f(const int& parm); // expected-note{{member declaration nearly matches}}
+  void f(const int& parm); // expected-note{{type of 1st parameter of member declaration does not match definition ('const int &' vs 'int')}}
   void f(int) const; // expected-note{{member declaration nearly matches}}
   void f(float);
 
@@ -140,7 +140,7 @@
 }
 
 namespace A {
-  void g(int&); // expected-note{{member declaration nearly matches}}
+  void g(int&); // expected-note{{type of 1st parameter of member declaration does not match definition ('int &' vs 'const int &')}}
 } 
 
 void A::f() {} // expected-error{{out-of-line definition of 'f' does not match any declaration in namespace 'A'}}