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/test/SemaObjC/DoubleMethod.m b/test/SemaObjC/DoubleMethod.m
index 70c7ed5..07e8912 100644
--- a/test/SemaObjC/DoubleMethod.m
+++ b/test/SemaObjC/DoubleMethod.m
@@ -10,7 +10,7 @@
 @end
 
 @implementation Subclass
-- (void) method {;} // expected-error {{previous declaration is here}}
+- (void) method {;} // expected-note {{previous declaration is here}}
 - (void) method {;} // expected-error {{duplicate declaration of method 'method'}}
 @end
 
diff --git a/test/SemaObjC/alias-test-1.m b/test/SemaObjC/alias-test-1.m
index fdaccf3..377f62f 100644
--- a/test/SemaObjC/alias-test-1.m
+++ b/test/SemaObjC/alias-test-1.m
@@ -2,7 +2,7 @@
 
 @compatibility_alias alias4 foo; // expected-warning {{cannot find interface declaration for 'foo'}}
 
-@class class2; // expected-error {{previous declaration is here}}
+@class class2; // expected-note {{previous declaration is here}}
 @class class3;
 
 typedef int I;  // expected-warning {{previous declaration is here}}
@@ -13,7 +13,7 @@
 @compatibility_alias alias class3;   // expected-error {{conflicting types for alias 'alias'}}
 
 
-typedef int alias2;	// expected-error {{previous declaration is here}}
+typedef int alias2;	// expected-note {{previous declaration is here}}
 @compatibility_alias alias2 class3;  // expected-error {{conflicting types for alias 'alias2'}}
 
 alias *p;
diff --git a/test/SemaObjC/alias-test-2.m b/test/SemaObjC/alias-test-2.m
index bdaeefe..4eb2007 100644
--- a/test/SemaObjC/alias-test-2.m
+++ b/test/SemaObjC/alias-test-2.m
@@ -1,7 +1,7 @@
 // RUN: clang -fsyntax-only -verify %s
 
 // Note: GCC doesn't produce any of the following errors.
-@interface Super @end // expected-error {{previous definition is here}}
+@interface Super @end // expected-note {{previous definition is here}}
 
 @interface MyWpModule @end  // expected-note {{previous definition is here}}
 
diff --git a/test/SemaObjC/check-dup-decl-methods-1.m b/test/SemaObjC/check-dup-decl-methods-1.m
index 36a98a2..985a4c1 100644
--- a/test/SemaObjC/check-dup-decl-methods-1.m
+++ b/test/SemaObjC/check-dup-decl-methods-1.m
@@ -8,7 +8,7 @@
 @interface T @end
 
 @interface class1 : SUPER
-- (int) meth;	// expected-error {{previous declaration is here}}
+- (int) meth;	// expected-note {{previous declaration is here}}
 - (int*) meth;	// expected-error {{duplicate declaration of method 'meth'}}
 - (T*) meth1;  
 - (T*) meth1;
@@ -16,7 +16,7 @@
 @end
 
 @interface class1(cat)
-- (int) catm : (char)ch1; // expected-error {{previous declaration is here}}
+- (int) catm : (char)ch1; // expected-note {{previous declaration is here}}
 - (int) catm1 : (char)ch : (int)i;
 - (int) catm : (char*)ch1; // expected-error {{duplicate declaration of method 'catm:'}}
 + (int) catm1 : (char)ch : (int)i;
@@ -24,15 +24,15 @@
 @end
 
 @interface class1(cat1)
-+ (int) catm1 : (char)ch : (int)i; // expected-error {{previous declaration is here}}
-+ (T*) meth1; // expected-error {{previous declaration is here}}
++ (int) catm1 : (char)ch : (int)i; // expected-note {{previous declaration is here}}
++ (T*) meth1; // expected-note {{previous declaration is here}}
 + (int) catm1 : (char)ch : (int*)i; // expected-error {{duplicate declaration of method 'catm1::'}}
 + (T**) meth1; // expected-error {{duplicate declaration of method 'meth1'}}
 + (int) foobar;
 @end
 
 @protocol P
-- (int) meth; // expected-error {{previous declaration is here}}
+- (int) meth; // expected-note {{previous declaration is here}}
 - (int*) meth; // expected-error {{duplicate declaration of method 'meth'}}
 @end
 
diff --git a/test/SemaObjC/check-dup-objc-decls-1.m b/test/SemaObjC/check-dup-objc-decls-1.m
index 28c6068..fa9b867 100644
--- a/test/SemaObjC/check-dup-objc-decls-1.m
+++ b/test/SemaObjC/check-dup-objc-decls-1.m
@@ -1,11 +1,11 @@
 // RUN: clang -fsyntax-only -verify %s
 
-@interface Foo // expected-error {{previous definition is here}}
+@interface Foo // expected-note {{previous definition is here}}
 @end
 
 float Foo;	// expected-error {{redefinition of 'Foo' as different kind of symbol}}
 
-@class Bar;  // expected-error {{previous definition is here}}
+@class Bar;  // expected-note {{previous definition is here}}
 
 typedef int Bar;  // expected-error {{redefinition of 'Bar' as different kind of symbol}}
 
@@ -13,12 +13,12 @@
 @end
 
 
-typedef int OBJECT; // expected-error {{previous definition is here}}
+typedef int OBJECT; // expected-note {{previous definition is here}}
 
 @class OBJECT ;	// expected-error {{redefinition of 'OBJECT' as different kind of symbol}}
 
 
-typedef int Gorf;  // expected-error {{previous definition is here}}
+typedef int Gorf;  // expected-note {{previous definition is here}}
 
 @interface Gorf @end // expected-error {{redefinition of 'Gorf' as different kind of symbol}}
 
diff --git a/test/SemaObjC/class-conforming-protocol-1.m b/test/SemaObjC/class-conforming-protocol-1.m
index 6afee0d..00f3204 100644
--- a/test/SemaObjC/class-conforming-protocol-1.m
+++ b/test/SemaObjC/class-conforming-protocol-1.m
@@ -5,11 +5,11 @@
 @protocol P3 @end
 
 @interface INTF 
-- (INTF*) METH1;	// expected-error {{previous declaration is here}}
+- (INTF*) METH1;	// expected-note {{previous declaration is here}}
 - (INTF<P1>*) METH1;	// expected-error {{duplicate declaration of method 'METH1'}}
 
 - (INTF<P1,P2>*) METH2;
-- (INTF<P2,P1>*) METH2;  // expected-error {{previous declaration is here}}
+- (INTF<P2,P1>*) METH2;  // expected-note {{previous declaration is here}}
 - (INTF<P2,P1,P3>*) METH2;  // expected-error {{duplicate declaration of method 'METH2'}}
 
 - (INTF<P2,P1,P3>*) METH3;
diff --git a/test/SemaObjC/class-def-test-1.m b/test/SemaObjC/class-def-test-1.m
index cf0ef53..ef226a5 100644
--- a/test/SemaObjC/class-def-test-1.m
+++ b/test/SemaObjC/class-def-test-1.m
@@ -4,17 +4,17 @@
 
 @interface SUPER <SUPER> @end // expected-warning {{cannot find protocol definition for 'SUPER'}}
 
-typedef int INTF; //  expected-error {{previous definition is here}}
+typedef int INTF; //  expected-note {{previous definition is here}}
 
 @interface INTF @end // expected-error {{redefinition of 'INTF' as different kind of symbol}}
 
-@interface OBJECT @end	// expected-error {{previous definition is here}}
+@interface OBJECT @end	// expected-note {{previous definition is here}}
 
 @interface INTF1 : OBJECT @end // expected-note {{previous definition is here}}
 
 @interface INTF1 : OBJECT @end // expected-error {{duplicate interface definition for class 'INTF1'}}
 
-typedef int OBJECT; // expected-error {{previous definition is here}}  \
+typedef int OBJECT; // expected-note {{previous definition is here}}  \
 		       expected-error {{redefinition of 'OBJECT' as different kind of symbol}}
 
 @interface INTF2 : OBJECT @end // expected-error {{redefinition of 'OBJECT' as different kind of symbol}}
diff --git a/test/SemaObjC/class-impl-1.m b/test/SemaObjC/class-impl-1.m
index dedce58..a3a1852 100644
--- a/test/SemaObjC/class-impl-1.m
+++ b/test/SemaObjC/class-impl-1.m
@@ -1,8 +1,8 @@
 // RUN: clang -fsyntax-only -verify %s
 
-typedef int INTF3; // expected-error {{previous definition is here}}
+typedef int INTF3; // expected-note {{previous definition is here}}
 
-@interface SUPER @end // expected-error {{previous definition is here}}
+@interface SUPER @end // expected-note {{previous definition is here}}
 
 @interface OBJECT @end
 
diff --git a/test/SemaObjC/conflicting-ivar-test-1.m b/test/SemaObjC/conflicting-ivar-test-1.m
index c5a6be4..3f27b2c 100644
--- a/test/SemaObjC/conflicting-ivar-test-1.m
+++ b/test/SemaObjC/conflicting-ivar-test-1.m
@@ -3,7 +3,7 @@
 @interface INTF 
 {
 @public
-	int IVAR; // expected-error {{previous definition is here}}
+	int IVAR; // expected-note {{previous definition is here}}
 }
 @end
 
@@ -54,7 +54,7 @@
 @interface INTF3
 {
 @public
-	int IVAR; // expected-error {{previous definition is here}}
+	int IVAR; // expected-note {{previous definition is here}}
 }
 @end
 
diff --git a/test/SemaObjC/ivar-sem-check-1.m b/test/SemaObjC/ivar-sem-check-1.m
index 4e810a2..4e46457 100644
--- a/test/SemaObjC/ivar-sem-check-1.m
+++ b/test/SemaObjC/ivar-sem-check-1.m
@@ -8,11 +8,11 @@
 	struct F {} JJ;
 	int arr[];  // expected-error {{field 'arr' has incomplete type}}
 	struct S IC;  // expected-error {{field 'IC' has incomplete type}}
-	struct T { // expected-error {{previous definition is here}}
+	struct T { // expected-note {{previous definition is here}}
 	  struct T {} X;  // expected-error {{nested redefinition of 'struct'}}
 	}YYY; 
 	FOO    BADFUNC;  // expected-error {{field 'BADFUNC' declared as a function}}
-	int kaka;	// expected-error {{previous definition is here}}
+	int kaka;	// expected-note {{previous definition is here}}
 	int kaka;	// expected-error {{duplicate member 'kaka'}}
 	char ch[];	// expected-error {{field 'ch' has incomplete type}}
 }