Patch to diagnose duplicate method implementations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43046 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/DoubleMethod.m b/test/Sema/DoubleMethod.m
new file mode 100644
index 0000000..70c7ed5
--- /dev/null
+++ b/test/Sema/DoubleMethod.m
@@ -0,0 +1,19 @@
+// RUN: clang -fsyntax-only -verify %s
+
+@interface Subclass
+{
+ int ivar;
+}
+
+- (void) method;
+- (void) method;
+@end
+
+@implementation Subclass
+- (void) method {;} // expected-error {{previous declaration is here}}
+- (void) method {;} // expected-error {{duplicate declaration of method 'method'}}
+@end
+
+int main (void) {
+ return 0;
+}