2012-01-18 06:24:32 +08:00
|
|
|
// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify %s
|
2007-10-11 08:55:41 +08:00
|
|
|
|
|
|
|
@protocol P1 @end
|
|
|
|
@protocol P2 @end
|
|
|
|
@protocol P3 @end
|
|
|
|
|
|
|
|
@interface INTF
|
2008-11-24 07:12:31 +08:00
|
|
|
- (INTF*) METH1; // expected-note {{previous declaration is here}}
|
2007-10-11 08:55:41 +08:00
|
|
|
- (INTF<P1>*) METH1; // expected-error {{duplicate declaration of method 'METH1'}}
|
|
|
|
|
2008-11-24 07:12:31 +08:00
|
|
|
- (INTF<P2,P1>*) METH2; // expected-note {{previous declaration is here}}
|
2007-10-11 08:55:41 +08:00
|
|
|
- (INTF<P2,P1,P3>*) METH2; // expected-error {{duplicate declaration of method 'METH2'}}
|
|
|
|
|
2011-12-14 03:40:34 +08:00
|
|
|
- (INTF<P2,P1,P3>*) METH3; // expected-note {{previous declaration is here}}
|
|
|
|
- (INTF<P3,P1,P2, P3>*) METH3; // expected-warning {{multiple declarations of method 'METH3' found and ignored}}
|
2007-10-11 08:55:41 +08:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
INTF<P2,P1,P3>* p1;
|
|
|
|
|