brintos

brintos / llvm-project-archived public Read only

0
0
Text · 521 B · 4eca4c7 Raw
20 lines · plain
1// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify -Wno-objc-root-class %s2 3@interface Subclass4{5    int ivar;6}7 8- (void) method; // expected-note {{previous declaration is here}}9- (void) method; // expected-warning {{multiple declarations of method 'method' found and ignored}}10@end11 12@implementation Subclass13- (void) method {;} // expected-note {{previous declaration is here}}14- (void) method {;} // expected-error {{duplicate declaration of method 'method'}}15@end16 17int main (void) {18    return 0;19}20