mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-10 04:36:08 +00:00

The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698> llvm-svn: 154187
20 lines
521 B
Objective-C
20 lines
521 B
Objective-C
// RUN: %clang_cc1 -Wduplicate-method-match -fsyntax-only -verify -Wno-objc-root-class %s
|
|
|
|
@interface Subclass
|
|
{
|
|
int ivar;
|
|
}
|
|
|
|
- (void) method; // expected-note {{previous declaration is here}}
|
|
- (void) method; // expected-warning {{multiple declarations of method 'method' found and ignored}}
|
|
@end
|
|
|
|
@implementation Subclass
|
|
- (void) method {;} // expected-note {{previous declaration is here}}
|
|
- (void) method {;} // expected-error {{duplicate declaration of method 'method'}}
|
|
@end
|
|
|
|
int main (void) {
|
|
return 0;
|
|
}
|