| 1 |
// RUN: %clang_analyze_cc1 %s \ |
| 2 |
// RUN: -analyzer-checker=core,debug.ExprInspection \ |
| 3 |
// RUN: -analyzer-config eagerly-assume=false \ |
| 4 |
// RUN: -analyzer-config support-symbolic-integer-casts=false \ |
| 5 |
// RUN: -verify |
| 6 |
|
| 7 |
// RUN: %clang_analyze_cc1 %s \ |
| 8 |
// RUN: -analyzer-checker=core,debug.ExprInspection \ |
| 9 |
// RUN: -analyzer-config eagerly-assume=false \ |
| 10 |
// RUN: -analyzer-config support-symbolic-integer-casts=true \ |
| 11 |
// RUN: -verify |
| 12 |
|
| 13 |
// expected-no-diagnostics |
| 14 |
|
| 15 |
void clang_analyzer_eval(int); |
| 16 |
void clang_analyzer_dump(int); |
| 17 |
|
| 18 |
void crash(int b, long c) { |
| 19 |
b = c; |
| 20 |
if (b > 0) |
| 21 |
if(-b) // should not crash here |
| 22 |
; |
| 23 |
} |