1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc@protocol P1 @end 4*f4a2713aSLionel Sambuc@protocol P2 @end 5*f4a2713aSLionel Sambuc@protocol P3 @end 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@interface INTF 8*f4a2713aSLionel Sambuc- (INTF*) METH1; // expected-note {{previous declaration is here}} 9*f4a2713aSLionel Sambuc- (INTF<P1>*) METH1; // expected-error {{duplicate declaration of method 'METH1'}} 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc- (INTF<P2,P1>*) METH2; // expected-note {{previous declaration is here}} 12*f4a2713aSLionel Sambuc- (INTF<P2,P1,P3>*) METH2; // expected-error {{duplicate declaration of method 'METH2'}} 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc- (INTF<P2,P1,P3>*) METH3; // expected-note {{previous declaration is here}} 15*f4a2713aSLionel Sambuc- (INTF<P3,P1,P2, P3>*) METH3; // expected-warning {{multiple declarations of method 'METH3' found and ignored}} 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc@end 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel SambucINTF<P2,P1,P3>* p1; 20*f4a2713aSLionel Sambuc 21