mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 12:36:37 +00:00

r265877 tries to put methods that are deprecated or unavailable to the front of the global pool to emit diagnostics, but it breaks some of our existing codes that depend on choosing a certain method for id lookup. This commit orders the methods with the same declaration with respect to the availability, but do not order methods with different declaration. rdar://25707511 llvm-svn: 266264
20 lines
400 B
Objective-C
20 lines
400 B
Objective-C
// RUN: %clang_cc1 -Wobjc-multiple-method-names -x objective-c %s -verify
|
|
// PR22047
|
|
|
|
@interface Face0
|
|
- (void)foo:(float)i; // expected-note {{using}}
|
|
@end
|
|
|
|
@interface Face1
|
|
- (void)foo:(int)i __attribute__((unavailable));
|
|
@end
|
|
|
|
@interface Face2
|
|
- (void)foo:(char)i; // expected-note {{also found}}
|
|
@end
|
|
|
|
void f(id i) {
|
|
[i foo:4.0f]; // expected-warning {{multiple methods named 'foo:' found}}
|
|
}
|
|
|