<html>
    <head>
      <base href="https://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 --- - Custom assert function is not registered as 'noreturn'"
   href="https://llvm.org/bugs/show_bug.cgi?id=23487">23487</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Custom assert function is not registered as 'noreturn'
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.5
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Static Analyzer
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>evanbenn@gmail.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>Created <span class=""><a href="attachment.cgi?id=14312" name="attach_14312" title="scan-build gcc -c clang-test-3.c finds a bug with this code.">attachment 14312</a> <a href="attachment.cgi?id=14312&action=edit" title="scan-build gcc -c clang-test-3.c finds a bug with this code.">[details]</a></span>
scan-build gcc -c clang-test-3.c finds a bug with this code.

I have a custom assert function that checks a value, prints some information,
and calls abort. (it does not call assert). 

I believe this is due to a function using a variable argument list. If I mark
the variable argument function __attribute__((__noreturn__)) then the 'assert'
is correctly identified. If I mark the abort function (called by the variable
argument function) with __attribute__((__noreturn__)) then the 'assert' is not
identified, and clang finds a bug with NULL pointer dereference.

I expect: scan-build to find no NULL pointer dereference
I get: scan-build does not recognise the abort(), and finds a NULL pointer
dereference.

I am on Ubuntu clang-3.5</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>