<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 - CSA doesn't show all bugs in function"
   href="https://bugs.llvm.org/show_bug.cgi?id=39134">39134</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>CSA doesn't show all bugs in function
          </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>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>dcoughlin@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>zamazan4ik@tut.by
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I am testing Clang Static Analyzer (CSA) on this code sample:


int main()
{
    int* c = new int[10];
    free(c);

    int* d = new int;
    free(d);

    int* e = (int*)malloc(10);
    delete e;
}


For testing I have built clang from trunk and run analysis as
'./scan-build -k --use-analyzer=clang ./clang++ main.cpp'. Then I get
only one report about first bug:


 main.cpp:11:14: warning: Memory allocated by 'new[]' should be
deallocated by 'delete[]', not free()
    free(c);
    ^~~~~~~
1 warning generated.
scan-build: 1 bug found.


No information about errors on the next lines. When I comment first two
lines with bug, CSA is able to find next bug and so on.</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>