Check for duplicate declaration of method of a class
in its extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65854 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/class-extension-dup-methods.m b/test/SemaObjC/class-extension-dup-methods.m
new file mode 100644
index 0000000..d13b218
--- /dev/null
+++ b/test/SemaObjC/class-extension-dup-methods.m
@@ -0,0 +1,15 @@
+// RUN: clang -fsyntax-only -verify %s
+
+@interface Foo
+- (int) garf; // expected-note {{ previous declaration is here}}
+- (int) OK;
++ (int) cgarf; // expected-note {{ previous declaration is here}}
+- (int) InstMeth;
+@end
+
+@interface Foo()
+- (void) garf; // expected-error {{duplicate declaration of method 'garf'}}
++ (void) cgarf; // expected-error {{duplicate declaration of method 'cgarf'}}
++ (int) InstMeth;
+- (int) OK;
+@end