| 1 |
// RUN: %clang_analyze_cc1 \ |
| 2 |
// RUN: -analyzer-checker=debug.ExprInspection %s 2>&1 | FileCheck %s |
| 3 |
|
| 4 |
void clang_analyzer_printState(void); |
| 5 |
|
| 6 |
void test_equivalence_classes(int a, int b, int c, int d) { |
| 7 |
if (a + b != c) |
| 8 |
return; |
| 9 |
if (a != d) |
| 10 |
return; |
| 11 |
if (b != 0) |
| 12 |
return; |
| 13 |
clang_analyzer_printState(); |
| 14 |
(void)(a * b * c * d); |
| 15 |
return; |
| 16 |
} |
| 17 |
|
| 18 |
// CHECK: "equivalence_classes": [ |
| 19 |
// CHECK-NEXT: [ "(reg_$0<int a>) != (reg_$5<int c>)" ], |
| 20 |
// CHECK-NEXT: [ "reg_$0<int a>", "reg_$20<int d>", "reg_$5<int c>" ] |
| 21 |
// CHECK-NEXT: ], |