Make all the 'redefinition' diagnostics more consistent, and make the 
"previously defined here" diagnostics all notes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index a92ad95..d9f3bc6 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -197,7 +197,7 @@
       Diag(NewParam->getLocation(), 
            diag::err_param_default_argument_redefinition)
         << NewParam->getDefaultArg()->getSourceRange();
-      Diag(OldParam->getLocation(), diag::err_previous_definition);
+      Diag(OldParam->getLocation(), diag::note_previous_definition);
     } else if (OldParam->getDefaultArg()) {
       // Merge the old default argument into the new parameter
       NewParam->setDefaultArg(OldParam->getDefaultArg());
@@ -1112,7 +1112,7 @@
   if (!IsOverload(ConDecl, ClassDecl->getConstructors(), MatchedDecl)) {
     Diag(ConDecl->getLocation(), diag::err_constructor_redeclared)
       << SourceRange(ConDecl->getLocation());
-    Diag((*MatchedDecl)->getLocation(), diag::err_previous_declaration)
+    Diag((*MatchedDecl)->getLocation(), diag::note_previous_declaration)
       << SourceRange((*MatchedDecl)->getLocation());
     ConDecl->setInvalidDecl();
     return ConDecl;
@@ -1157,9 +1157,9 @@
   if (CXXDestructorDecl *PrevDestructor = ClassDecl->getDestructor()) {
     Diag(Destructor->getLocation(), diag::err_destructor_redeclared);
     Diag(PrevDestructor->getLocation(),
-         PrevDestructor->isThisDeclarationADefinition()?
-             diag::err_previous_definition
-           : diag::err_previous_declaration);
+         PrevDestructor->isThisDeclarationADefinition() ?
+             diag::note_previous_definition
+           : diag::note_previous_declaration);
     Destructor->setInvalidDecl();
     return Destructor;
   }
@@ -1188,8 +1188,8 @@
       Diag(Conversion->getLocation(), diag::err_conv_function_redeclared);
       Diag(OtherConv->getLocation(),
            OtherConv->isThisDeclarationADefinition()?
-              diag::err_previous_definition
-            : diag::err_previous_declaration);
+              diag::note_previous_definition
+            : diag::note_previous_declaration);
       Conversion->setInvalidDecl();
       return (DeclTy *)Conversion;      
     }
@@ -1272,7 +1272,7 @@
         // This is an invalid name redefinition.
         Diag(Namespc->getLocation(), diag::err_redefinition_different_kind)
           << Namespc->getDeclName();
-        Diag(PrevDecl->getLocation(), diag::err_previous_definition);
+        Diag(PrevDecl->getLocation(), diag::note_previous_definition);
         Namespc->setInvalidDecl();
         // Continue on to push Namespc as current DeclContext and return it.
       }