Valeriy Savchenko 45212dec01 [analyzer][solver] Prevent use of a null state
rdar://77686137

Differential Revision: https://reviews.llvm.org/D102240
2021-05-13 20:16:29 +03:00

13 lines
267 B
C

// RUN: %clang_analyze_cc1 -w -analyzer-checker=core -verify %s \
// RUN: -analyzer-config eagerly-assume=true
// expected-no-diagnostics
int test(unsigned long a, unsigned long c, int b) {
c -= a;
if (0 >= b) {}
c == b;
return c ? 0 : 2; // no-crash
}