summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/multiple-method-names.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/multiple-method-names.m')
-rw-r--r--clang/test/SemaObjC/multiple-method-names.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/multiple-method-names.m b/clang/test/SemaObjC/multiple-method-names.m
new file mode 100644
index 00000000000..9fd83b208ab
--- /dev/null
+++ b/clang/test/SemaObjC/multiple-method-names.m
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -Wobjc-multiple-method-names -x objective-c %s -verify
+// PR22047
+
+@interface Face0
+- (void)foo:(float)i; // expected-note {{using}}
+@end
+
+@interface Face1
+- (void)foo:(int)i __attribute__((unavailable));
+@end
+
+@interface Face2
+- (void)foo:(char)i; // expected-note {{also found}}
+@end
+
+void f(id i) {
+ [i foo:4.0f]; // expected-warning {{multiple methods named 'foo:' found}}
+}
+
OpenPOWER on IntegriCloud