<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 --- - -Wempty-body false negative on NULL check"
   href="http://llvm.org/bugs/show_bug.cgi?id=19785">19785</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-Wempty-body false negative on NULL check
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.4
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>publicposting@lapcatsoftware.com
          </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>-Wempty-body false negatives for 3 and 4 below.

$ cat > empty.c
#include <stddef.h>

int main( int argc, const char **argv )
{
    if ( !argv );
        return 1;

    if ( argv );
        return 2;

    if ( argv == NULL );
        return 3;

    if ( argv != NULL );
        return 4;

    if ( NULL == argv );
        return 5;

    if ( NULL != argv );
        return 6;

    return 0;
}
$ clang -Wempty-body empty.c 
empty.c:5:14: warning: if statement has empty body [-Wempty-body]
        if ( !argv );
                    ^
empty.c:5:14: note: put the semicolon on a separate line to silence this
warning
empty.c:8:13: warning: if statement has empty body [-Wempty-body]
        if ( argv );
                   ^
empty.c:8:13: note: put the semicolon on a separate line to silence this
warning
empty.c:17:21: warning: if statement has empty body [-Wempty-body]
        if ( NULL == argv );
                           ^
empty.c:17:21: note: put the semicolon on a separate line to silence this
warning
empty.c:20:21: warning: if statement has empty body [-Wempty-body]
        if ( NULL != argv );
                           ^
empty.c:20:21: note: put the semicolon on a separate line to silence this
warning
4 warnings generated.</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>