| 1 |
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -w \ |
| 2 |
// RUN: -analyzer-config crosscheck-with-z3=true -verify %s |
| 3 |
// REQUIRES: z3 |
| 4 |
|
| 5 |
// Previously these tests were crashing because the SMTConv layer did not |
| 6 |
// comprehend the _BitInt types. |
| 7 |
|
| 8 |
void clang_analyzer_warnIfReached(); |
| 9 |
|
| 10 |
void c(int b, _BitInt(35) a) { |
| 11 |
int d = 0; |
| 12 |
if (a) |
| 13 |
b = d; |
| 14 |
clang_analyzer_warnIfReached(); // expected-warning{{REACHABLE}} |
| 15 |
} |
| 16 |
|
| 17 |
void f(int *d, _BitInt(3) e) { |
| 18 |
int g; |
| 19 |
d = &g; |
| 20 |
e ?: 0; |
| 21 |
clang_analyzer_warnIfReached(); // expected-warning{{REACHABLE}} |
| 22 |
} |