[LLVMbugs] [Bug 22047] New: ObjC: Method unavailability attribute doesn't work with overloaded methods
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Dec 28 13:47:18 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=22047
Bug ID: 22047
Summary: ObjC: Method unavailability attribute doesn't work
with overloaded methods
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
@interface Face1
- (void)foo:(int)i __attribute__((unavailable));
@end
@interface Face0
- (void)foo:(float)i;
@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
- (void)foo:(int)i __attribute__((unavailable));
^
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141228/17384876/attachment.html>
More information about the llvm-bugs
mailing list