[Sema] Emit a better diagnostic when variable redeclarations disagree

We referred to all declaration in definitions in our diagnostic messages
which is can be inaccurate.  Instead, classify the declaration and emit
an appropriate diagnostic for the new declaration and an appropriate
note pointing to the old one.

This fixes PR24116.

llvm-svn: 242190
diff --git a/clang/test/Modules/linkage-merge.m b/clang/test/Modules/linkage-merge.m
index 955eb1a..e7b9e5c 100644
--- a/clang/test/Modules/linkage-merge.m
+++ b/clang/test/Modules/linkage-merge.m
@@ -16,8 +16,8 @@
 extern int f3(float); // okay: considered distinct
 
 extern float v0;
-// expected-error@-1{{redefinition of 'v0' with a different type: 'float' vs 'int'}}
-// expected-note@Inputs/linkage-merge-sub.h:6{{previous definition is here}}
+// expected-error@-1{{redeclaration of 'v0' with a different type: 'float' vs 'int'}}
+// expected-note@Inputs/linkage-merge-sub.h:6{{previous declaration is here}}
 
 static float v1;
 static float v2;