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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to