objc: diagnose duplicate declaration of methods
in classes. // rdar://10535349


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146504 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/enhanced-proto-1.m b/test/Parser/enhanced-proto-1.m
index a3819f3..fa6e413 100644
--- a/test/Parser/enhanced-proto-1.m
+++ b/test/Parser/enhanced-proto-1.m
@@ -4,7 +4,7 @@
 @optional
 - (void) FOO;
 @optional
-- (void) FOO;
+- (void) FOO1;
 @required 
 - (void) REQ;
 @optional
diff --git a/test/SemaObjC/DoubleMethod.m b/test/SemaObjC/DoubleMethod.m
index 98aa699..6c7e907 100644
--- a/test/SemaObjC/DoubleMethod.m
+++ b/test/SemaObjC/DoubleMethod.m
@@ -5,8 +5,8 @@
     int ivar;
 }
 
-- (void) method;
-- (void) method;
+- (void) method; // expected-note {{previous declaration is here}}
+- (void) method; // expected-warning {{multiple declarations of method 'method' found and ignored}}
 @end
 
 @implementation Subclass
diff --git a/test/SemaObjC/check-dup-decl-methods-1.m b/test/SemaObjC/check-dup-decl-methods-1.m
index 1dd6446..667c381 100644
--- a/test/SemaObjC/check-dup-decl-methods-1.m
+++ b/test/SemaObjC/check-dup-decl-methods-1.m
@@ -10,8 +10,8 @@
 @interface class1 : SUPER
 - (int) meth;	// expected-note {{previous declaration is here}}
 - (int*) meth;	// expected-error {{duplicate declaration of method 'meth'}}
-- (T*) meth1;  
-- (T*) meth1;
+- (T*) meth1;   // expected-note {{previous declaration is here}}
+- (T*) meth1;   // expected-warning {{multiple declarations of method 'meth1' found and ignored}}
 + (T*) meth1;
 @end
 
diff --git a/test/SemaObjC/class-conforming-protocol-1.m b/test/SemaObjC/class-conforming-protocol-1.m
index 43ea6d3..5d4e86d 100644
--- a/test/SemaObjC/class-conforming-protocol-1.m
+++ b/test/SemaObjC/class-conforming-protocol-1.m
@@ -8,12 +8,11 @@
 - (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-note {{previous declaration is here}}
 - (INTF<P2,P1,P3>*) METH2;  // expected-error {{duplicate declaration of method 'METH2'}}
 
-- (INTF<P2,P1,P3>*) METH3;
-- (INTF<P3,P1,P2, P3>*) METH3;
+- (INTF<P2,P1,P3>*) METH3; // expected-note {{previous declaration is here}}
+- (INTF<P3,P1,P2, P3>*) METH3; // expected-warning {{multiple declarations of method 'METH3' found and ignored}}
 
 @end
 
diff --git a/test/SemaObjC/enhanced-proto-2.m b/test/SemaObjC/enhanced-proto-2.m
index da7875c..de1d56a 100644
--- a/test/SemaObjC/enhanced-proto-2.m
+++ b/test/SemaObjC/enhanced-proto-2.m
@@ -4,7 +4,7 @@
 @optional
 - (void) FOO;
 @optional
-- (void) FOO;
+- (void) FOO1;
 @optional 
 - (void) REQ;
 @optional
diff --git a/test/SemaObjC/undefined-protocol-type-1.m b/test/SemaObjC/undefined-protocol-type-1.m
index 3be4425..f1a0802 100644
--- a/test/SemaObjC/undefined-protocol-type-1.m
+++ b/test/SemaObjC/undefined-protocol-type-1.m
@@ -5,5 +5,5 @@
 
 @interface T
 - (T<p2, p3, p1, p4>*) meth;  // expected-error {{cannot find protocol declaration for 'p3'}}
-- (T<p2, p3, p1, p4>*) meth;  // expected-error {{cannot find protocol declaration for 'p3'}}
+- (T<p2, p3, p1, p4>*) meth1;  // expected-error {{cannot find protocol declaration for 'p3'}}
 @end