Skip to content

Commit ee892ea

Browse files
committed
C++: Accept test changes.
1 parent df01693 commit ee892ea

6 files changed

Lines changed: 743 additions & 8 deletions

File tree

cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected

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

cpp/ql/test/library-tests/dataflow/fields/dataflow-ir-consistency.expected

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

cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ edges
8888
| arrays.cpp:36:26:36:35 | call to user_input | arrays.cpp:37:24:37:27 | data |
8989
| by_reference.cpp:50:3:50:3 | setDirectly output argument [a] | by_reference.cpp:51:10:51:20 | call to getDirectly |
9090
| by_reference.cpp:50:17:50:26 | call to user_input | by_reference.cpp:50:3:50:3 | setDirectly output argument [a] |
91+
| by_reference.cpp:56:3:56:3 | Chi [a] | by_reference.cpp:57:10:57:22 | call to getIndirectly |
92+
| by_reference.cpp:56:3:56:3 | setIndirectly output argument [a] | by_reference.cpp:56:3:56:3 | Chi [a] |
9193
| by_reference.cpp:56:3:56:3 | setIndirectly output argument [a] | by_reference.cpp:57:10:57:22 | call to getIndirectly |
9294
| by_reference.cpp:56:19:56:28 | call to user_input | by_reference.cpp:56:3:56:3 | setIndirectly output argument [a] |
95+
| by_reference.cpp:62:3:62:3 | Chi [a] | by_reference.cpp:63:10:63:28 | call to getThroughNonMember |
96+
| by_reference.cpp:62:3:62:3 | setThroughNonMember output argument [a] | by_reference.cpp:62:3:62:3 | Chi [a] |
9397
| by_reference.cpp:62:3:62:3 | setThroughNonMember output argument [a] | by_reference.cpp:63:10:63:28 | call to getThroughNonMember |
9498
| by_reference.cpp:62:25:62:34 | call to user_input | by_reference.cpp:62:3:62:3 | setThroughNonMember output argument [a] |
9599
| by_reference.cpp:68:17:68:18 | nonMemberSetA output argument [a] | by_reference.cpp:69:8:69:20 | call to nonMemberGetA |
@@ -159,28 +163,59 @@ edges
159163
| constructors.cpp:26:15:26:15 | *f [a_] | constructors.cpp:28:12:28:12 | call to a |
160164
| constructors.cpp:26:15:26:15 | *f [b_] | constructors.cpp:28:10:28:10 | a output argument [b_] |
161165
| constructors.cpp:26:15:26:15 | *f [b_] | constructors.cpp:29:12:29:12 | call to b |
166+
| constructors.cpp:26:15:26:15 | f [array content, a_] | constructors.cpp:28:10:28:10 | (reference dereference) [array content, a_] |
167+
| constructors.cpp:26:15:26:15 | f [array content, b_] | constructors.cpp:28:10:28:10 | (reference dereference) [array content, b_] |
168+
| constructors.cpp:26:15:26:15 | f [array content, b_] | constructors.cpp:29:10:29:10 | (reference dereference) [array content, b_] |
169+
| constructors.cpp:28:10:28:10 | (reference dereference) [array content, a_] | constructors.cpp:28:12:28:12 | call to a |
170+
| constructors.cpp:28:10:28:10 | (reference dereference) [array content, b_] | constructors.cpp:28:10:28:10 | a output argument [b_] |
162171
| constructors.cpp:28:10:28:10 | a output argument [b_] | constructors.cpp:29:12:29:12 | call to b |
172+
| constructors.cpp:28:10:28:10 | a output argument [b_] | constructors.cpp:29:12:29:12 | call to b |
173+
| constructors.cpp:29:10:29:10 | (reference dereference) [array content, b_] | constructors.cpp:29:12:29:12 | call to b |
163174
| constructors.cpp:34:11:34:20 | call to user_input | constructors.cpp:34:11:34:26 | Foo output argument [a_] |
175+
| constructors.cpp:34:11:34:26 | Chi [a_] | constructors.cpp:26:15:26:15 | f [array content, a_] |
164176
| constructors.cpp:34:11:34:26 | Foo output argument [a_] | constructors.cpp:26:15:26:15 | *f [a_] |
177+
| constructors.cpp:34:11:34:26 | Foo output argument [a_] | constructors.cpp:34:11:34:26 | Chi [a_] |
178+
| constructors.cpp:35:11:35:26 | Chi [b_] | constructors.cpp:26:15:26:15 | f [array content, b_] |
165179
| constructors.cpp:35:11:35:26 | Foo output argument [b_] | constructors.cpp:26:15:26:15 | *f [b_] |
180+
| constructors.cpp:35:11:35:26 | Foo output argument [b_] | constructors.cpp:35:11:35:26 | Chi [b_] |
166181
| constructors.cpp:35:14:35:23 | call to user_input | constructors.cpp:35:11:35:26 | Foo output argument [b_] |
167182
| constructors.cpp:36:11:36:20 | call to user_input | constructors.cpp:36:11:36:37 | Foo output argument [a_] |
183+
| constructors.cpp:36:11:36:37 | Chi [a_] | constructors.cpp:26:15:26:15 | f [array content, a_] |
184+
| constructors.cpp:36:11:36:37 | Chi [b_] | constructors.cpp:26:15:26:15 | f [array content, b_] |
168185
| constructors.cpp:36:11:36:37 | Foo output argument [a_] | constructors.cpp:26:15:26:15 | *f [a_] |
186+
| constructors.cpp:36:11:36:37 | Foo output argument [a_] | constructors.cpp:36:11:36:37 | Chi [a_] |
169187
| constructors.cpp:36:11:36:37 | Foo output argument [b_] | constructors.cpp:26:15:26:15 | *f [b_] |
188+
| constructors.cpp:36:11:36:37 | Foo output argument [b_] | constructors.cpp:36:11:36:37 | Chi [b_] |
170189
| constructors.cpp:36:25:36:34 | call to user_input | constructors.cpp:36:11:36:37 | Foo output argument [b_] |
171190
| simple.cpp:26:15:26:15 | *f [a_] | simple.cpp:28:12:28:12 | call to a |
172191
| simple.cpp:26:15:26:15 | *f [b_] | simple.cpp:28:10:28:10 | a output argument [b_] |
173192
| simple.cpp:26:15:26:15 | *f [b_] | simple.cpp:29:12:29:12 | call to b |
193+
| simple.cpp:26:15:26:15 | f [array content, a_] | simple.cpp:28:10:28:10 | (reference dereference) [array content, a_] |
194+
| simple.cpp:26:15:26:15 | f [array content, b_] | simple.cpp:28:10:28:10 | (reference dereference) [array content, b_] |
195+
| simple.cpp:26:15:26:15 | f [array content, b_] | simple.cpp:29:10:29:10 | (reference dereference) [array content, b_] |
196+
| simple.cpp:28:10:28:10 | (reference dereference) [array content, a_] | simple.cpp:28:12:28:12 | call to a |
197+
| simple.cpp:28:10:28:10 | (reference dereference) [array content, b_] | simple.cpp:28:10:28:10 | a output argument [b_] |
198+
| simple.cpp:28:10:28:10 | a output argument [b_] | simple.cpp:29:12:29:12 | call to b |
174199
| simple.cpp:28:10:28:10 | a output argument [b_] | simple.cpp:29:12:29:12 | call to b |
200+
| simple.cpp:29:10:29:10 | (reference dereference) [array content, b_] | simple.cpp:29:12:29:12 | call to b |
201+
| simple.cpp:39:5:39:5 | Chi [a_] | simple.cpp:26:15:26:15 | f [array content, a_] |
175202
| simple.cpp:39:5:39:5 | setA output argument [a_] | simple.cpp:26:15:26:15 | *f [a_] |
203+
| simple.cpp:39:5:39:5 | setA output argument [a_] | simple.cpp:39:5:39:5 | Chi [a_] |
176204
| simple.cpp:39:12:39:21 | call to user_input | simple.cpp:39:5:39:5 | setA output argument [a_] |
205+
| simple.cpp:40:5:40:5 | Chi [b_] | simple.cpp:26:15:26:15 | f [array content, b_] |
177206
| simple.cpp:40:5:40:5 | setB output argument [b_] | simple.cpp:26:15:26:15 | *f [b_] |
207+
| simple.cpp:40:5:40:5 | setB output argument [b_] | simple.cpp:40:5:40:5 | Chi [b_] |
178208
| simple.cpp:40:12:40:21 | call to user_input | simple.cpp:40:5:40:5 | setB output argument [b_] |
179209
| simple.cpp:41:5:41:5 | setA output argument [a_] | simple.cpp:26:15:26:15 | *f [a_] |
210+
| simple.cpp:41:5:41:5 | setA output argument [a_] | simple.cpp:42:5:42:5 | Chi [a_] |
180211
| simple.cpp:41:5:41:5 | setA output argument [a_] | simple.cpp:42:5:42:5 | setB output argument [a_] |
181212
| simple.cpp:41:12:41:21 | call to user_input | simple.cpp:41:5:41:5 | setA output argument [a_] |
213+
| simple.cpp:42:5:42:5 | Chi [a_] | simple.cpp:26:15:26:15 | f [array content, a_] |
214+
| simple.cpp:42:5:42:5 | Chi [b_] | simple.cpp:26:15:26:15 | f [array content, b_] |
182215
| simple.cpp:42:5:42:5 | setB output argument [a_] | simple.cpp:26:15:26:15 | *f [a_] |
216+
| simple.cpp:42:5:42:5 | setB output argument [a_] | simple.cpp:42:5:42:5 | Chi [a_] |
183217
| simple.cpp:42:5:42:5 | setB output argument [b_] | simple.cpp:26:15:26:15 | *f [b_] |
218+
| simple.cpp:42:5:42:5 | setB output argument [b_] | simple.cpp:42:5:42:5 | Chi [b_] |
184219
| simple.cpp:42:12:42:21 | call to user_input | simple.cpp:42:5:42:5 | setB output argument [b_] |
185220
| simple.cpp:65:5:65:22 | Store [i] | simple.cpp:66:12:66:12 | Store [i] |
186221
| simple.cpp:65:11:65:20 | call to user_input | simple.cpp:65:5:65:22 | Store [i] |
@@ -309,9 +344,11 @@ nodes
309344
| by_reference.cpp:50:3:50:3 | setDirectly output argument [a] | semmle.label | setDirectly output argument [a] |
310345
| by_reference.cpp:50:17:50:26 | call to user_input | semmle.label | call to user_input |
311346
| by_reference.cpp:51:10:51:20 | call to getDirectly | semmle.label | call to getDirectly |
347+
| by_reference.cpp:56:3:56:3 | Chi [a] | semmle.label | Chi [a] |
312348
| by_reference.cpp:56:3:56:3 | setIndirectly output argument [a] | semmle.label | setIndirectly output argument [a] |
313349
| by_reference.cpp:56:19:56:28 | call to user_input | semmle.label | call to user_input |
314350
| by_reference.cpp:57:10:57:22 | call to getIndirectly | semmle.label | call to getIndirectly |
351+
| by_reference.cpp:62:3:62:3 | Chi [a] | semmle.label | Chi [a] |
315352
| by_reference.cpp:62:3:62:3 | setThroughNonMember output argument [a] | semmle.label | setThroughNonMember output argument [a] |
316353
| by_reference.cpp:62:25:62:34 | call to user_input | semmle.label | call to user_input |
317354
| by_reference.cpp:63:10:63:28 | call to getThroughNonMember | semmle.label | call to getThroughNonMember |
@@ -376,28 +413,48 @@ nodes
376413
| complex.cpp:56:19:56:28 | call to user_input | semmle.label | call to user_input |
377414
| constructors.cpp:26:15:26:15 | *f [a_] | semmle.label | *f [a_] |
378415
| constructors.cpp:26:15:26:15 | *f [b_] | semmle.label | *f [b_] |
416+
| constructors.cpp:26:15:26:15 | f [array content, a_] | semmle.label | f [array content, a_] |
417+
| constructors.cpp:26:15:26:15 | f [array content, b_] | semmle.label | f [array content, b_] |
418+
| constructors.cpp:28:10:28:10 | (reference dereference) [array content, a_] | semmle.label | (reference dereference) [array content, a_] |
419+
| constructors.cpp:28:10:28:10 | (reference dereference) [array content, b_] | semmle.label | (reference dereference) [array content, b_] |
420+
| constructors.cpp:28:10:28:10 | a output argument [b_] | semmle.label | a output argument [b_] |
379421
| constructors.cpp:28:10:28:10 | a output argument [b_] | semmle.label | a output argument [b_] |
380422
| constructors.cpp:28:12:28:12 | call to a | semmle.label | call to a |
423+
| constructors.cpp:29:10:29:10 | (reference dereference) [array content, b_] | semmle.label | (reference dereference) [array content, b_] |
381424
| constructors.cpp:29:12:29:12 | call to b | semmle.label | call to b |
382425
| constructors.cpp:34:11:34:20 | call to user_input | semmle.label | call to user_input |
426+
| constructors.cpp:34:11:34:26 | Chi [a_] | semmle.label | Chi [a_] |
383427
| constructors.cpp:34:11:34:26 | Foo output argument [a_] | semmle.label | Foo output argument [a_] |
428+
| constructors.cpp:35:11:35:26 | Chi [b_] | semmle.label | Chi [b_] |
384429
| constructors.cpp:35:11:35:26 | Foo output argument [b_] | semmle.label | Foo output argument [b_] |
385430
| constructors.cpp:35:14:35:23 | call to user_input | semmle.label | call to user_input |
386431
| constructors.cpp:36:11:36:20 | call to user_input | semmle.label | call to user_input |
432+
| constructors.cpp:36:11:36:37 | Chi [a_] | semmle.label | Chi [a_] |
433+
| constructors.cpp:36:11:36:37 | Chi [b_] | semmle.label | Chi [b_] |
387434
| constructors.cpp:36:11:36:37 | Foo output argument [a_] | semmle.label | Foo output argument [a_] |
388435
| constructors.cpp:36:11:36:37 | Foo output argument [b_] | semmle.label | Foo output argument [b_] |
389436
| constructors.cpp:36:25:36:34 | call to user_input | semmle.label | call to user_input |
390437
| simple.cpp:26:15:26:15 | *f [a_] | semmle.label | *f [a_] |
391438
| simple.cpp:26:15:26:15 | *f [b_] | semmle.label | *f [b_] |
439+
| simple.cpp:26:15:26:15 | f [array content, a_] | semmle.label | f [array content, a_] |
440+
| simple.cpp:26:15:26:15 | f [array content, b_] | semmle.label | f [array content, b_] |
441+
| simple.cpp:28:10:28:10 | (reference dereference) [array content, a_] | semmle.label | (reference dereference) [array content, a_] |
442+
| simple.cpp:28:10:28:10 | (reference dereference) [array content, b_] | semmle.label | (reference dereference) [array content, b_] |
443+
| simple.cpp:28:10:28:10 | a output argument [b_] | semmle.label | a output argument [b_] |
392444
| simple.cpp:28:10:28:10 | a output argument [b_] | semmle.label | a output argument [b_] |
393445
| simple.cpp:28:12:28:12 | call to a | semmle.label | call to a |
446+
| simple.cpp:29:10:29:10 | (reference dereference) [array content, b_] | semmle.label | (reference dereference) [array content, b_] |
394447
| simple.cpp:29:12:29:12 | call to b | semmle.label | call to b |
448+
| simple.cpp:39:5:39:5 | Chi [a_] | semmle.label | Chi [a_] |
395449
| simple.cpp:39:5:39:5 | setA output argument [a_] | semmle.label | setA output argument [a_] |
396450
| simple.cpp:39:12:39:21 | call to user_input | semmle.label | call to user_input |
451+
| simple.cpp:40:5:40:5 | Chi [b_] | semmle.label | Chi [b_] |
397452
| simple.cpp:40:5:40:5 | setB output argument [b_] | semmle.label | setB output argument [b_] |
398453
| simple.cpp:40:12:40:21 | call to user_input | semmle.label | call to user_input |
399454
| simple.cpp:41:5:41:5 | setA output argument [a_] | semmle.label | setA output argument [a_] |
400455
| simple.cpp:41:12:41:21 | call to user_input | semmle.label | call to user_input |
456+
| simple.cpp:42:5:42:5 | Chi [a_] | semmle.label | Chi [a_] |
457+
| simple.cpp:42:5:42:5 | Chi [b_] | semmle.label | Chi [b_] |
401458
| simple.cpp:42:5:42:5 | setB output argument [a_] | semmle.label | setB output argument [a_] |
402459
| simple.cpp:42:5:42:5 | setB output argument [b_] | semmle.label | setB output argument [b_] |
403460
| simple.cpp:42:12:42:21 | call to user_input | semmle.label | call to user_input |

cpp/ql/test/library-tests/dataflow/taint-tests/standalone_iterators.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ class non_iterator {
3939
void test_typedefs(int_iterator_by_typedefs source1) {
4040
sink(*source1); // $ ast,ir
4141
sink(*(source1++)); // $ ast,ir
42-
sink(*(++source1)); // $ ast MISSING: ir
42+
sink(*(++source1)); // $ ast,ir
4343
}
4444

4545
void test_trait(int_iterator_by_trait source1) {
4646
sink(*source1); // $ ast,ir
4747
sink(*(source1++)); // $ ast,ir
48-
sink(*(++source1)); // $ ast MISSING: ir
48+
sink(*(++source1)); // $ ast,ir
4949
}
5050

5151
void test_non_iterator(non_iterator source1) {

cpp/ql/test/library-tests/dataflow/taint-tests/string.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,19 +396,19 @@ void test_string_iterators() {
396396
sink(*(i2+1)); // $ ast,ir
397397
sink(*(i2-1)); // $ ast,ir
398398
i3 = i2;
399-
sink(*(++i3)); // $ ast MISSING: ir
399+
sink(*(++i3)); // $ ast,ir
400400
i4 = i2;
401-
sink(*(--i4)); // $ ast MISSING: ir
401+
sink(*(--i4)); // $ ast,ir
402402
i5 = i2;
403403
i5++;
404404
sink(*i5); // $ ast,ir
405405
i6 = i2;
406406
i6--;
407407
sink(*i6); // $ ast,ir
408408
i7 = i2;
409-
sink(*(i7+=1)); // $ ast MISSING: ir
409+
sink(*(i7+=1)); // $ ast,ir
410410
i8 = i2;
411-
sink(*(i8-=1)); // $ ast MISSING: ir
411+
sink(*(i8-=1)); // $ ast,ir
412412

413413
i9 = s2.end();
414414
--i9;

cpp/ql/test/library-tests/dataflow/taint-tests/stringstream.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ void test_getline()
229229

230230
sink(ss2.getline(b7, 1000).getline(b8, 1000)); // $ ast,ir
231231
sink(b7); // $ ast,ir
232-
sink(b8); // $ ast MISSING: ir
232+
sink(b8); // $ ast,ir
233233

234234
sink(getline(ss1, s1));
235235
sink(getline(ss2, s2)); // $ ast,ir
@@ -261,7 +261,7 @@ void test_chaining()
261261

262262
sink(ss1.get(b1, 100).unget().get(b2, 100)); // $ ast,ir
263263
sink(b1); // $ ast,ir
264-
sink(b2); // $ ast MISSING: ir
264+
sink(b2); // $ ast,ir
265265

266266
sink(ss2.write("abc", 3).flush().write(source(), 3).flush().write("xyz", 3)); // $ ast MISSING: ir
267267
sink(ss2); // $ ast MISSING: ir

0 commit comments

Comments
 (0)