| 1 |
// RUN: %clang_analyze_cc1 %s \ |
| 2 |
// RUN: -analyzer-checker=core \ |
| 3 |
// RUN: -analyzer-checker=debug.ExprInspection \ |
| 4 |
// RUN: -verify |
| 5 |
|
| 6 |
// Here, we test that symbol simplification in the solver does not produce any |
| 7 |
// crashes. |
| 8 |
// https://bugs.llvm.org/show_bug.cgi?id=51109 |
| 9 |
|
| 10 |
// expected-no-diagnostics |
| 11 |
|
| 12 |
int a, b, c, d; |
| 13 |
void f(void) { |
| 14 |
a = -1; |
| 15 |
d = b * a; |
| 16 |
a = d / c; |
| 17 |
if (a < 7 / b) |
| 18 |
return; |
| 19 |
if (d *a / c < 7 / b) |
| 20 |
return; |
| 21 |
if (b == 1 && c == -1) |
| 22 |
return; |
| 23 |
} |