http://llvm.org/bugs/show_bug.cgi?id=22204

            Bug ID: 22204
           Summary: -disable-checker causes assert
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to