2012-01-18 06:24:32 +08:00
|
|
|
// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify %s
|
2007-10-17 05:52:23 +08:00
|
|
|
|
|
|
|
@interface Subclass
|
|
|
|
{
|
|
|
|
int ivar;
|
|
|
|
}
|
|
|
|
|
2011-12-14 03:40:34 +08:00
|
|
|
- (void) method; // expected-note {{previous declaration is here}}
|
|
|
|
- (void) method; // expected-warning {{multiple declarations of method 'method' found and ignored}}
|
2007-10-17 05:52:23 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Subclass
|
2008-11-24 07:12:31 +08:00
|
|
|
- (void) method {;} // expected-note {{previous declaration is here}}
|
2007-10-17 05:52:23 +08:00
|
|
|
- (void) method {;} // expected-error {{duplicate declaration of method 'method'}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
int main (void) {
|
|
|
|
return 0;
|
|
|
|
}
|