aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/class-extension-dup-methods.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/class-extension-dup-methods.m')
-rw-r--r--test/SemaObjC/class-extension-dup-methods.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaObjC/class-extension-dup-methods.m b/test/SemaObjC/class-extension-dup-methods.m
new file mode 100644
index 000000000000..f50b293ade36
--- /dev/null
+++ b/test/SemaObjC/class-extension-dup-methods.m
@@ -0,0 +1,15 @@
+// RUN: clang-cc -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