aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/method-lookup-3.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/method-lookup-3.m')
-rw-r--r--test/SemaObjC/method-lookup-3.m26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/SemaObjC/method-lookup-3.m b/test/SemaObjC/method-lookup-3.m
index b3d9c46484c3..ff2c4898a411 100644
--- a/test/SemaObjC/method-lookup-3.m
+++ b/test/SemaObjC/method-lookup-3.m
@@ -71,3 +71,29 @@ struct test4b { float x, y; };
void test4(id x) {
(void) [x test4]; //expected-warning {{multiple methods named 'test4' found}}
}
+
+// rdar://19265296
+#pragma clang diagnostic ignored "-Wobjc-multiple-method-names"
+@interface NSObject
++ (id)alloc;
++ (id)class;
+- (id) init;
+@end
+
+@class NSString;
+@interface A : NSObject
+- (instancetype)initWithType:(NSString *)whatever;
+@end
+
+@interface Test : NSObject @end
+
+@implementation Test
++ (instancetype)foo
+{
+ return [[[self class] alloc] initWithType:3];
+}
+- (instancetype)initWithType:(int)whatever
+{
+ return [super init];
+}
+@end