blob: 4eca4c701af79be8a9609a7fd31efbc634d00184 [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify -Wno-objc-root-class %s
Fariborz Jahanian3e7fd152007-10-16 21:52:23 +00002
3@interface Subclass
4{
5 int ivar;
6}
7
Fariborz Jahanian72096462011-12-13 19:40:34 +00008- (void) method; // expected-note {{previous declaration is here}}
9- (void) method; // expected-warning {{multiple declarations of method 'method' found and ignored}}
Fariborz Jahanian3e7fd152007-10-16 21:52:23 +000010@end
11
12@implementation Subclass
Chris Lattner5f4a6822008-11-23 23:12:31 +000013- (void) method {;} // expected-note {{previous declaration is here}}
Fariborz Jahanian3e7fd152007-10-16 21:52:23 +000014- (void) method {;} // expected-error {{duplicate declaration of method 'method'}}
15@end
16
17int main (void) {
18 return 0;
19}