1f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc@interface Foo 4f4a2713aSLionel Sambuc- (int) garf; // expected-note {{previous declaration is here}} 5f4a2713aSLionel Sambuc- (int) OK; 6f4a2713aSLionel Sambuc+ (int) cgarf; // expected-note {{previous declaration is here}} 7f4a2713aSLionel Sambuc- (int) InstMeth; 8f4a2713aSLionel Sambuc@end 9f4a2713aSLionel Sambuc 10f4a2713aSLionel Sambuc@interface Foo() 11f4a2713aSLionel Sambuc- (void) garf; // expected-error {{duplicate declaration of method 'garf'}} 12f4a2713aSLionel Sambuc+ (void) cgarf; // expected-error {{duplicate declaration of method 'cgarf'}} 13f4a2713aSLionel Sambuc+ (int) InstMeth; 14f4a2713aSLionel Sambuc- (int) OK; 15f4a2713aSLionel Sambuc@end 16*0a6a1f1dSLionel Sambuc 17*0a6a1f1dSLionel Sambuc// rdar://16312105 18*0a6a1f1dSLionel Sambuc@class NSObject; 19*0a6a1f1dSLionel Sambuc 20*0a6a1f1dSLionel Sambuc__attribute__((objc_root_class)) @interface AppDelegate 21*0a6a1f1dSLionel Sambuc+ (void)someMethodWithArgument:(NSObject *)argument; 22*0a6a1f1dSLionel Sambuc+ (void)someMethodWithArgument:(NSObject *)argument : (NSObject*) argument2; // expected-note {{previous declaration is here}} 23*0a6a1f1dSLionel Sambuc@end 24*0a6a1f1dSLionel Sambuc 25*0a6a1f1dSLionel Sambuc@interface AppDelegate () 26*0a6a1f1dSLionel Sambuc- (void)someMethodWithArgument:(float)argument; // OK. No warning to be issued here. 27*0a6a1f1dSLionel Sambuc+ (void)someMethodWithArgument:(float)argument : (float)argument2; // expected-error {{duplicate declaration of method 'someMethodWithArgument::'}} 28*0a6a1f1dSLionel Sambuc@end 29