<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Add strict checker for nullability"
   href="https://bugs.llvm.org/show_bug.cgi?id=33280">33280</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Add strict checker for nullability
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>4.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>kremenek@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>michael.eisel@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The _Nonnull and _Nullable annotations seem mainly focused on preventing the
literal "nil" being passed into a method or set for a nonnull property.
However, this is much more relaxed than Swift's null checking. It would be
great if we could statically analyze if what was being passed in as a nonnull
parameter was nonnull itself. It could recognize if a nullable variable was
being used in a way that made it nonnull.

For example:
if (!x) {
  return;
}
[self runWithNonnullArg:x];

or

[self runWithNonnullArg:(x ?: @"")];

Both of these would be pass the static analysis.</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>