1 // RUN: %clang_analyze_cc1 -analyzer-checker=core \
2 // RUN: -analyzer-checker=debug.ExprInspection \
5 void clang_analyzer_dump(int);
7 void test_0_multiplier1(int x
, int y
) {
8 int a
= x
< 0; // Eagerly bifurcate.
9 clang_analyzer_dump(a
);
10 // expected-warning@-1{{0 S32b}}
11 // expected-warning@-2{{1 S32b}}
14 clang_analyzer_dump(b
);
15 // expected-warning@-1{{0 S32b}}
16 // expected-warning-re@-2{{reg_${{[[:digit:]]+}}<int y>}}
19 void test_0_multiplier2(int x
, int y
) {
20 int a
= x
< 0; // Eagerly bifurcate.
21 clang_analyzer_dump(a
);
22 // expected-warning@-1{{0 S32b}}
23 // expected-warning@-2{{1 S32b}}
26 clang_analyzer_dump(b
);
27 // expected-warning@-1{{0 S32b}}
28 // expected-warning-re@-2{{reg_${{[[:digit:]]+}}<int y>}}
31 void test_0_modulo(int x
, int y
) {
32 int a
= x
< 0; // Eagerly bifurcate.
33 clang_analyzer_dump(a
);
34 // expected-warning@-1{{0 S32b}}
35 // expected-warning@-2{{1 S32b}}
38 clang_analyzer_dump(b
);
39 // expected-warning@-1{{0 S32b}}
40 // expected-warning-re@-2{{1 % (reg_${{[[:digit:]]+}}<int y>)}}
43 void test_0_divisible(int x
, int y
) {
44 int a
= x
< 0; // Eagerly bifurcate.
45 clang_analyzer_dump(a
);
46 // expected-warning@-1{{0 S32b}}
47 // expected-warning@-2{{1 S32b}}
50 clang_analyzer_dump(b
);
51 // expected-warning@-1{{0 S32b}}
52 // expected-warning-re@-2{{1 / (reg_${{[[:digit:]]+}}<int y>)}}