1 // RUN: %clang_cc1 -Wobjc-multiple-method-names -x objective-c -verify %s
2 // RUN: %clang_cc1 -Wobjc-multiple-method-names -x objective-c -verify -fobjc-arc %s
3 // expected-no-diagnostics
7 + (instancetype) alloc;
9 + (_Nonnull instancetype) globalObject;
13 @interface SelfAllocReturn: NSObj
15 - (instancetype)initWithFoo:(int)x;
19 @interface SelfAllocReturn2: NSObj
21 - (instancetype)initWithFoo:(SelfAllocReturn *)x;
25 @implementation SelfAllocReturn
27 - (instancetype)initWithFoo:(int)x {
31 + (instancetype) thingWithFoo:(int)x {
32 return [[self alloc] initWithFoo: x];
36 (void)[[self globalObject] initWithFoo: 20];