1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc@interface SUPER 4*f4a2713aSLionel Sambuc- (int) meth; 5*f4a2713aSLionel Sambuc+ (int) foobar; 6*f4a2713aSLionel Sambuc@end 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc@interface T @end 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc@interface class1 : SUPER 11*f4a2713aSLionel Sambuc- (int) meth; // expected-note {{previous declaration is here}} 12*f4a2713aSLionel Sambuc- (int*) meth; // expected-error {{duplicate declaration of method 'meth'}} 13*f4a2713aSLionel Sambuc- (T*) meth1; // expected-note {{previous declaration is here}} 14*f4a2713aSLionel Sambuc- (T*) meth1; // expected-warning {{multiple declarations of method 'meth1' found and ignored}} 15*f4a2713aSLionel Sambuc+ (T*) meth1; 16*f4a2713aSLionel Sambuc@end 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc@interface class1(cat) 19*f4a2713aSLionel Sambuc- (int) catm : (char)ch1; // expected-note {{previous declaration is here}} 20*f4a2713aSLionel Sambuc- (int) catm1 : (char)ch : (int)i; 21*f4a2713aSLionel Sambuc- (int) catm : (char*)ch1; // expected-error {{duplicate declaration of method 'catm:'}} 22*f4a2713aSLionel Sambuc+ (int) catm1 : (char)ch : (int)i; 23*f4a2713aSLionel Sambuc+ (T*) meth1; 24*f4a2713aSLionel Sambuc@end 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc@interface class1(cat1) 27*f4a2713aSLionel Sambuc+ (int) catm1 : (char)ch : (int)i; // expected-note {{previous declaration is here}} 28*f4a2713aSLionel Sambuc+ (T*) meth1; // expected-note {{previous declaration is here}} 29*f4a2713aSLionel Sambuc+ (int) catm1 : (char)ch : (int*)i; // expected-error {{duplicate declaration of method 'catm1::'}} 30*f4a2713aSLionel Sambuc+ (T**) meth1; // expected-error {{duplicate declaration of method 'meth1'}} 31*f4a2713aSLionel Sambuc+ (int) foobar; 32*f4a2713aSLionel Sambuc@end 33*f4a2713aSLionel Sambuc 34*f4a2713aSLionel Sambuc@protocol P 35*f4a2713aSLionel Sambuc- (int) meth; // expected-note {{previous declaration is here}} 36*f4a2713aSLionel Sambuc- (int*) meth; // expected-error {{duplicate declaration of method 'meth'}} 37*f4a2713aSLionel Sambuc@end 38*f4a2713aSLionel Sambuc 39