<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 --- - -disable-checker causes assert"
   href="http://llvm.org/bugs/show_bug.cgi?id=22205">22205</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-disable-checker causes assert
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.4
          </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>adrian.swain@tibra.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>I found this problem using clang 3.4 and checker-276.  I have just checked to
see if the problem still occurs with a trunk build of llvm + clang and it does.

ex.cpp - contains a divide by zero error

int main()
{
    int i = 0;
    return 1/i;
}

As soon as you try and disable the relevant core checker the static analyzer
asserts

$HOME/llvm-20150112/tools/clang/tools/scan-build/scan-build
--use-analyzer=$HOEM/llvm-20150112-build/Release+Asserts/bin/clang
--use-c++=$HOME/llvm-20150112-build/Release+Asserts/bin/clang -disable-checker
core.DivideZero clang -g -o ex ex.cpp

clang: /vault/home/adrian.swain/llvm-20150112/lib/Support/APInt.cpp:1866:
llvm::APInt llvm::APInt::udiv(const llvm::APInt&) const: Assertion `RHS.VAL !=
0 && "Divide by zero?"' failed.</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>