<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 --- - Static analyzer crashes when processing K&R function calls"
   href="http://llvm.org/bugs/show_bug.cgi?id=16307">16307</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Static analyzer crashes when processing K&R function calls
          </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>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>labath@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, 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=10665" name="attach_10665" title="Error message, backtrace">attachment 10665</a> <a href="attachment.cgi?id=10665&action=edit" title="Error message, backtrace">[details]</a></span>
Error message, backtrace

The static analyzer crashes when run on the following file:
-----
void f(a) int a; { }
void g() { f(); }
-----

$ ~/llvm/build/bin/clang --analyze /tmp/a.c 
clang-3.4: ../tools/clang/include/clang/AST/Expr.h:2196: const clang::Expr
*clang::CallExpr::getArg(unsigned int) const: Assertion `Arg < NumArgs && "Arg
access out of range!"' failed.


I include the backtrace in the attachment. The bug does not happen with
clang-3.0.</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>