ObjC: Method unavailability attribute doesn't work with overloaded methods #22421
Labels
bugzilla
Issues migrated from bugzilla
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
Extended Description
@interface Face1
@end
@interface Face0
@end
void f(id i) {
[i foo:4.0f];
}
$ bin/clang -c test.m
test.m:9:6: error: 'foo:' is unavailable
[i foo:4.0f];
^
test.m:2:1: note: 'foo:' has been explicitly marked unavailable here
^
This is incorrect, the float version of foo: is available. This is because the warning only looks at the first overload.
If the order of Face1 and Face0 is swapped, the warning goes away.
The text was updated successfully, but these errors were encountered: