blob: 4eca4c701af79be8a9609a7fd31efbc634d00184 [file] [log] [blame]
Patrick Beardacfbe9e2012-04-06 18:12:22 +00001// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify -Wno-objc-root-class %s
Fariborz Jahanianebac2cb2007-10-16 21:52:23 +00002
3@interface Subclass
4{
5 int ivar;
6}
7
Fariborz Jahanianc17c86b2011-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 Jahanianebac2cb2007-10-16 21:52:23 +000010@end
11
12@implementation Subclass
Chris Lattner0369c572008-11-23 23:12:31 +000013- (void) method {;} // expected-note {{previous declaration is here}}
Fariborz Jahanianebac2cb2007-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}