Skip to content

Commit bb85aa2

Browse files
committed
C++: Accept test changes.
1 parent 442968c commit bb85aa2

File tree

7 files changed

+490
-3
lines changed

7 files changed

+490
-3
lines changed

cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/RangeAnalysis.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
| test.cpp:49:12:49:12 | Load: x | test.cpp:46:22:46:22 | ValueNumberBound | -1 | true | CompareLT: ... < ... | test.cpp:48:9:48:13 | test.cpp:48:9:48:13 |
1818
| test.cpp:49:12:49:12 | Load: x | test.cpp:46:29:46:29 | ValueNumberBound | -2 | true | CompareLT: ... < ... | test.cpp:48:9:48:13 | test.cpp:48:9:48:13 |
1919
| test.cpp:54:12:54:12 | Load: x | test.cpp:46:22:46:22 | ValueNumberBound | -1 | true | CompareLT: ... < ... | test.cpp:52:7:52:11 | test.cpp:52:7:52:11 |
20+
| test.cpp:54:12:54:12 | Load: x | test.cpp:46:29:46:29 | ValueNumberBound | -2 | true | CompareLT: ... < ... | test.cpp:52:7:52:11 | test.cpp:52:7:52:11 |
2021
| test.cpp:62:10:62:13 | Load: iter | test.cpp:60:17:60:17 | ValueNumberBound | 0 | false | NoReason | file://:0:0:0:0 | file://:0:0:0:0 |
2122
| test.cpp:62:10:62:13 | Load: iter | test.cpp:60:17:60:17 | ValueNumberBound | 3 | true | CompareLT: ... < ... | test.cpp:61:32:61:51 | test.cpp:61:32:61:51 |
2223
| test.cpp:62:10:62:13 | Load: iter | test.cpp:61:39:61:51 | ValueNumberBound | -1 | true | CompareLT: ... < ... | test.cpp:61:32:61:51 | test.cpp:61:32:61:51 |

cpp/ql/test/experimental/library-tests/rangeanalysis/rangeanalysis/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int test5(int x, int y, int z) {
5151
}
5252
if (x < y) {
5353
if (y < z) {
54-
sink(x); // x < z is not inferred here
54+
sink(x); // x < z is inferred here
5555
}
5656
}
5757
}

cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected

Lines changed: 318 additions & 0 deletions
Large diffs are not rendered by default.

cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
| 7 | 0 < x+0 when ... > ... is true |
22
| 7 | 0 >= x+0 when ... > ... is false |
3+
| 7 | ... > ... != 0 when ... > ... is true |
4+
| 7 | ... > ... == 0 when ... > ... is false |
35
| 7 | x < 0+1 when ... > ... is false |
46
| 7 | x < 1 when ... > ... is false |
57
| 7 | x >= 0+1 when ... > ... is true |
@@ -10,6 +12,12 @@
1012
| 17 | 1 < y+0 when ... && ... is true |
1113
| 17 | 1 < y+0 when ... > ... is true |
1214
| 17 | 1 >= y+0 when ... > ... is false |
15+
| 17 | ... < ... != 0 when ... && ... is true |
16+
| 17 | ... < ... != 0 when ... < ... is true |
17+
| 17 | ... < ... == 0 when ... < ... is false |
18+
| 17 | ... > ... != 0 when ... && ... is true |
19+
| 17 | ... > ... != 0 when ... > ... is true |
20+
| 17 | ... > ... == 0 when ... > ... is false |
1321
| 17 | x < 0 when ... && ... is true |
1422
| 17 | x < 0 when ... < ... is true |
1523
| 17 | x < 0+0 when ... && ... is true |
@@ -26,24 +34,32 @@
2634
| 18 | call to get == 0 when call to get is false |
2735
| 26 | 0 < x+0 when ... > ... is true |
2836
| 26 | 0 >= x+0 when ... > ... is false |
37+
| 26 | ... > ... != 0 when ... > ... is true |
38+
| 26 | ... > ... == 0 when ... > ... is false |
2939
| 26 | x < 0+1 when ... > ... is false |
3040
| 26 | x < 1 when ... > ... is false |
3141
| 26 | x >= 0+1 when ... > ... is true |
3242
| 26 | x >= 1 when ... > ... is true |
3343
| 31 | - ... != x+0 when ... == ... is false |
3444
| 31 | - ... == x+0 when ... == ... is true |
45+
| 31 | ... == ... != 0 when ... == ... is true |
46+
| 31 | ... == ... == 0 when ... == ... is false |
3547
| 31 | x != -1 when ... == ... is false |
3648
| 31 | x != - ...+0 when ... == ... is false |
3749
| 31 | x == -1 when ... == ... is true |
3850
| 31 | x == - ...+0 when ... == ... is true |
3951
| 34 | 10 < j+1 when ... < ... is false |
4052
| 34 | 10 >= j+1 when ... < ... is true |
53+
| 34 | ... < ... != 0 when ... < ... is true |
54+
| 34 | ... < ... == 0 when ... < ... is false |
4155
| 34 | j < 10 when ... < ... is true |
4256
| 34 | j < 10+0 when ... < ... is true |
4357
| 34 | j >= 10 when ... < ... is false |
4458
| 34 | j >= 10+0 when ... < ... is false |
4559
| 42 | 10 < j+1 when ... < ... is false |
4660
| 42 | 10 >= j+1 when ... < ... is true |
61+
| 42 | ... < ... != 0 when ... < ... is true |
62+
| 42 | ... < ... == 0 when ... < ... is false |
4763
| 42 | call to getABool != 0 when call to getABool is true |
4864
| 42 | call to getABool == 0 when call to getABool is false |
4965
| 42 | j < 10 when ... < ... is true |
@@ -52,12 +68,16 @@
5268
| 42 | j >= 10+0 when ... < ... is false |
5369
| 44 | 0 < z+0 when ... > ... is true |
5470
| 44 | 0 >= z+0 when ... > ... is false |
71+
| 44 | ... > ... != 0 when ... > ... is true |
72+
| 44 | ... > ... == 0 when ... > ... is false |
5573
| 44 | z < 0+1 when ... > ... is false |
5674
| 44 | z < 1 when ... > ... is false |
5775
| 44 | z >= 0+1 when ... > ... is true |
5876
| 44 | z >= 1 when ... > ... is true |
5977
| 45 | 0 < y+0 when ... > ... is true |
6078
| 45 | 0 >= y+0 when ... > ... is false |
79+
| 45 | ... > ... != 0 when ... > ... is true |
80+
| 45 | ... > ... == 0 when ... > ... is false |
6181
| 45 | y < 0+1 when ... > ... is false |
6282
| 45 | y < 1 when ... > ... is false |
6383
| 45 | y >= 0+1 when ... > ... is true |
@@ -68,6 +88,12 @@
6888
| 58 | 0 < y+1 when ... \|\| ... is false |
6989
| 58 | 0 == x+0 when ... == ... is true |
7090
| 58 | 0 >= y+1 when ... < ... is true |
91+
| 58 | ... < ... != 0 when ... < ... is true |
92+
| 58 | ... < ... == 0 when ... < ... is false |
93+
| 58 | ... < ... == 0 when ... \|\| ... is false |
94+
| 58 | ... == ... != 0 when ... == ... is true |
95+
| 58 | ... == ... == 0 when ... == ... is false |
96+
| 58 | ... == ... == 0 when ... \|\| ... is false |
7197
| 58 | x != 0 when ... == ... is false |
7298
| 58 | x != 0 when ... \|\| ... is false |
7399
| 58 | x != 0+0 when ... == ... is false |
@@ -89,6 +115,8 @@
89115
| 74 | i >= 11 when i is Case[11..20] |
90116
| 75 | 0 != x+0 when ... == ... is false |
91117
| 75 | 0 == x+0 when ... == ... is true |
118+
| 75 | ... == ... != 0 when ... == ... is true |
119+
| 75 | ... == ... == 0 when ... == ... is false |
92120
| 75 | x != 0 when ... == ... is false |
93121
| 75 | x != 0+0 when ... == ... is false |
94122
| 75 | x == 0 when ... == ... is true |
@@ -99,6 +127,12 @@
99127
| 85 | 0 == x+0 when ... && ... is true |
100128
| 85 | 0 == x+0 when ... == ... is true |
101129
| 85 | 0 == y+0 when ... != ... is false |
130+
| 85 | ... != ... != 0 when ... != ... is true |
131+
| 85 | ... != ... != 0 when ... && ... is true |
132+
| 85 | ... != ... == 0 when ... != ... is false |
133+
| 85 | ... == ... != 0 when ... && ... is true |
134+
| 85 | ... == ... != 0 when ... == ... is true |
135+
| 85 | ... == ... == 0 when ... == ... is false |
102136
| 85 | x != 0 when ... == ... is false |
103137
| 85 | x != 0+0 when ... == ... is false |
104138
| 85 | x == 0 when ... && ... is true |
@@ -115,18 +149,26 @@
115149
| 93 | c == 0 when c is false |
116150
| 94 | 0 != x+0 when ... != ... is true |
117151
| 94 | 0 == x+0 when ... != ... is false |
152+
| 94 | ... != ... != 0 when ... != ... is true |
153+
| 94 | ... != ... == 0 when ... != ... is false |
118154
| 94 | x != 0 when ... != ... is true |
119155
| 94 | x != 0+0 when ... != ... is true |
120156
| 94 | x == 0 when ... != ... is false |
121157
| 94 | x == 0+0 when ... != ... is false |
158+
| 99 | f != 0 when f is true |
159+
| 99 | f == 0 when f is false |
122160
| 102 | 10 < j+1 when ... < ... is false |
123161
| 102 | 10 >= j+1 when ... < ... is true |
162+
| 102 | ... < ... != 0 when ... < ... is true |
163+
| 102 | ... < ... == 0 when ... < ... is false |
124164
| 102 | j < 10 when ... < ... is true |
125165
| 102 | j < 10+0 when ... < ... is true |
126166
| 102 | j >= 10 when ... < ... is false |
127167
| 102 | j >= 10+0 when ... < ... is false |
128168
| 105 | 0.0 != f+0 when ... != ... is true |
129169
| 105 | 0.0 == f+0 when ... != ... is false |
170+
| 105 | ... != ... != 0 when ... != ... is true |
171+
| 105 | ... != ... == 0 when ... != ... is false |
130172
| 105 | f != 0.0+0 when ... != ... is true |
131173
| 105 | f == 0.0+0 when ... != ... is false |
132174
| 109 | 0 != x+0 when ... == ... is false |
@@ -135,6 +177,12 @@
135177
| 109 | 0 < y+1 when ... \|\| ... is false |
136178
| 109 | 0 == x+0 when ... == ... is true |
137179
| 109 | 0 >= y+1 when ... < ... is true |
180+
| 109 | ... < ... != 0 when ... < ... is true |
181+
| 109 | ... < ... == 0 when ... < ... is false |
182+
| 109 | ... < ... == 0 when ... \|\| ... is false |
183+
| 109 | ... == ... != 0 when ... == ... is true |
184+
| 109 | ... == ... == 0 when ... == ... is false |
185+
| 109 | ... == ... == 0 when ... \|\| ... is false |
138186
| 109 | x != 0 when ... == ... is false |
139187
| 109 | x != 0 when ... \|\| ... is false |
140188
| 109 | x != 0+0 when ... == ... is false |
@@ -149,6 +197,8 @@
149197
| 109 | y >= 0+0 when ... \|\| ... is false |
150198
| 111 | 0.0 != i+0 when ... != ... is true |
151199
| 111 | 0.0 == i+0 when ... != ... is false |
200+
| 111 | ... != ... != 0 when ... != ... is true |
201+
| 111 | ... != ... == 0 when ... != ... is false |
152202
| 111 | i != 0.0+0 when ... != ... is true |
153203
| 111 | i == 0.0+0 when ... != ... is false |
154204
| 122 | b != 0 when b is true |
@@ -166,6 +216,8 @@
166216
| 126 | call to test3_condition == 0 when call to test3_condition is false |
167217
| 131 | ... + ... != a+0 when call to __builtin_expect is false |
168218
| 131 | ... + ... == a+0 when call to __builtin_expect is true |
219+
| 131 | ... == ... != 0 when call to __builtin_expect is true |
220+
| 131 | ... == ... == 0 when call to __builtin_expect is false |
169221
| 131 | a != ... + ...+0 when call to __builtin_expect is false |
170222
| 131 | a != b+42 when call to __builtin_expect is false |
171223
| 131 | a == ... + ...+0 when call to __builtin_expect is true |
@@ -176,6 +228,8 @@
176228
| 131 | b == a+-42 when call to __builtin_expect is true |
177229
| 131 | call to __builtin_expect != 0 when call to __builtin_expect is true |
178230
| 131 | call to __builtin_expect == 0 when call to __builtin_expect is false |
231+
| 135 | ... != ... != 0 when call to __builtin_expect is true |
232+
| 135 | ... != ... == 0 when call to __builtin_expect is false |
179233
| 135 | ... + ... != a+0 when call to __builtin_expect is true |
180234
| 135 | ... + ... == a+0 when call to __builtin_expect is false |
181235
| 135 | a != ... + ...+0 when call to __builtin_expect is true |
@@ -190,6 +244,8 @@
190244
| 137 | 0 == 0 when 0 is false |
191245
| 141 | 42 != a+0 when call to __builtin_expect is false |
192246
| 141 | 42 == a+0 when call to __builtin_expect is true |
247+
| 141 | ... == ... != 0 when call to __builtin_expect is true |
248+
| 141 | ... == ... == 0 when call to __builtin_expect is false |
193249
| 141 | a != 42 when call to __builtin_expect is false |
194250
| 141 | a != 42+0 when call to __builtin_expect is false |
195251
| 141 | a == 42 when call to __builtin_expect is true |
@@ -198,6 +254,8 @@
198254
| 141 | call to __builtin_expect == 0 when call to __builtin_expect is false |
199255
| 145 | 42 != a+0 when call to __builtin_expect is true |
200256
| 145 | 42 == a+0 when call to __builtin_expect is false |
257+
| 145 | ... != ... != 0 when call to __builtin_expect is true |
258+
| 145 | ... != ... == 0 when call to __builtin_expect is false |
201259
| 145 | a != 42 when call to __builtin_expect is true |
202260
| 145 | a != 42+0 when call to __builtin_expect is true |
203261
| 145 | a == 42 when call to __builtin_expect is false |

0 commit comments

Comments
 (0)