Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / expr-inspection-printState-diseq-info.c
blobc5c31785a600ef6c147d58d4d9c797ac41351314
1 // RUN: %clang_analyze_cc1 \
2 // RUN: -analyzer-checker=debug.ExprInspection %s 2>&1 | FileCheck %s
4 void clang_analyzer_printState(void);
6 void test_disequality_info(int e0, int b0, int b1, int c0) {
7 int e1 = e0 - b0;
8 if (b0 == 2) {
9 int e2 = e1 - b1;
10 if (e2 > 0) {
11 if (b1 != c0)
12 clang_analyzer_printState();
17 // CHECK: "disequality_info": [
18 // CHECK-NEXT: {
19 // CHECK-NEXT: "class": [ "(reg_$0<int e0>) - 2" ],
20 // CHECK-NEXT: "disequal_to": [
21 // CHECK-NEXT: [ "reg_$2<int b1>" ]]
22 // CHECK-NEXT: },
23 // CHECK-NEXT: {
24 // CHECK-NEXT: "class": [ "reg_$2<int b1>" ],
25 // CHECK-NEXT: "disequal_to": [
26 // CHECK-NEXT: [ "(reg_$0<int e0>) - 2" ],
27 // CHECK-NEXT: [ "reg_$3<int c0>" ]]
28 // CHECK-NEXT: },
29 // CHECK-NEXT: {
30 // CHECK-NEXT: "class": [ "reg_$3<int c0>" ],
31 // CHECK-NEXT: "disequal_to": [
32 // CHECK-NEXT: [ "reg_$2<int b1>" ]]
33 // CHECK-NEXT: }
34 // CHECK-NEXT: ],