| 1 |
// RUN: rm -rf %t && mkdir %t |
| 2 |
// RUN: %host_cxx -shared -fPIC %S/Inputs/MockZ3_solver_check.c -o %t/MockZ3_solver_check.so |
| 3 |
// |
| 4 |
// RUN: LD_PRELOAD="%t/MockZ3_solver_check.so" \ |
| 5 |
// RUN: %clang_cc1 -analyze -analyzer-constraints=z3 -setup-static-analyzer \ |
| 6 |
// RUN: -analyzer-checker=core,debug.ExprInspection %s -verify 2>&1 | FileCheck %s |
| 7 |
// |
| 8 |
// REQUIRES: z3, asserts, shell, system-linux |
| 9 |
// |
| 10 |
// Works only with the z3 constraint manager. |
| 11 |
// expected-no-diagnostics |
| 12 |
|
| 13 |
// CHECK: Z3_solver_check returns the real value: TRUE |
| 14 |
// CHECK-NEXT: Z3_solver_check returns the real value: TRUE |
| 15 |
// CHECK-NEXT: Z3_solver_check returns the real value: TRUE |
| 16 |
// CHECK-NEXT: Z3_solver_check returns the real value: TRUE |
| 17 |
// CHECK-NEXT: Z3_solver_check returns a mocked value: UNDEF |
| 18 |
|
| 19 |
void D83660(int b) { |
| 20 |
if (b) { |
| 21 |
} |
| 22 |
(void)b; // no-crash |
| 23 |
} |