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