Go to file
Anna Zaks 0d58033bdb [analyzer] Remove redundant check from DivZeroChecker
Analysis by Ted:
"
    if (stateZero && !stateNotZero) {

is checking to see if:

  (A)  "it is possible for the value to be zero"   (stateZero)

    AND

  (B) "it is not possible for the value to be non-zero"  (!stateNotZero)

That said, the only way for both B to be true AND A to be false is if the path is completely infeasible by the time we reach the divide-by-zero check.  For the most part (all cases?), such cases should automatically get pruned out at branches (i.e., an infeasible path gets dropped), which is the case in our tests.  So the question is whether or not such an infeasible path might not get dropped earlier?  I can't envision any right now.

Indeed, the rest of the checker assumes that if the bug condition didn't fire then 'stateNotZero' is non-NULL:

    C.addTransition(stateNotZero);
"

llvm-svn: 144114
2011-11-08 19:56:35 +00:00
clang [analyzer] Remove redundant check from DivZeroChecker 2011-11-08 19:56:35 +00:00
compiler-rt <rdar://problem/10172492> No armv4t slice of libcompiler_rt-static.a 2011-09-27 20:05:27 +00:00
debuginfo-tests Testcase for r133065 2011-06-15 17:57:23 +00:00
libcxx Remove support folder from Apple install 2011-11-04 15:59:51 +00:00
libcxxabi reformatted to match Clang style; thanks to John McCall for the nudge 2011-08-15 18:06:47 +00:00
lldb Add "QAddressIsExecutable" packet to debugserver. Used to test 2011-11-08 04:28:12 +00:00
llvm MC/COFF: Correctly emit the size of an empty string table. 2011-11-08 19:52:32 +00:00
polly Detect Parameters directly on the SCEV. 2011-11-08 15:41:28 +00:00