<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - ObjC: Method unavailability attribute doesn't work with overloaded methods"
   href="http://llvm.org/bugs/show_bug.cgi?id=22047">22047</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ObjC: Method unavailability attribute doesn't work with overloaded methods
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>@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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>