Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71a605b

Browse files
committed
C++: Add tests for std::pair.
1 parent e836bae commit 71a605b

5 files changed

Lines changed: 273 additions & 7 deletions

File tree

cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected

Lines changed: 155 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@
260260
| file://:0:0:0:0 | p#0 | file://:0:0:0:0 | p#0 | |
261261
| file://:0:0:0:0 | p#0 | file://:0:0:0:0 | p#0 | |
262262
| file://:0:0:0:0 | p#0 | file://:0:0:0:0 | p#0 | |
263+
| file://:0:0:0:0 | p#0 | file://:0:0:0:0 | p#0 | |
263264
| format.cpp:16:21:16:21 | s | format.cpp:22:22:22:22 | s | |
264265
| format.cpp:16:31:16:31 | n | format.cpp:22:25:22:25 | n | |
265266
| format.cpp:16:46:16:51 | format | format.cpp:22:28:22:33 | format | |
@@ -390,6 +391,144 @@
390391
| format.cpp:158:13:158:18 | call to wcslen | format.cpp:158:13:158:26 | ... / ... | TAINT |
391392
| format.cpp:158:13:158:26 | ... / ... | format.cpp:158:7:158:27 | ... + ... | TAINT |
392393
| format.cpp:158:26:158:26 | 2 | format.cpp:158:13:158:26 | ... / ... | TAINT |
394+
| map.cpp:14:28:14:28 | call to pair | map.cpp:16:2:16:2 | a | |
395+
| map.cpp:14:28:14:28 | call to pair | map.cpp:17:7:17:7 | a | |
396+
| map.cpp:14:28:14:28 | call to pair | map.cpp:18:7:18:7 | a | |
397+
| map.cpp:14:28:14:28 | call to pair | map.cpp:19:7:19:7 | a | |
398+
| map.cpp:14:31:14:31 | call to pair | map.cpp:21:2:21:2 | b | |
399+
| map.cpp:14:31:14:31 | call to pair | map.cpp:22:7:22:7 | b | |
400+
| map.cpp:14:31:14:31 | call to pair | map.cpp:23:7:23:7 | b | |
401+
| map.cpp:14:31:14:31 | call to pair | map.cpp:24:7:24:7 | b | |
402+
| map.cpp:14:34:14:34 | call to pair | map.cpp:26:2:26:2 | c | |
403+
| map.cpp:14:34:14:34 | call to pair | map.cpp:27:7:27:7 | c | |
404+
| map.cpp:14:34:14:34 | call to pair | map.cpp:28:7:28:7 | c | |
405+
| map.cpp:14:34:14:34 | call to pair | map.cpp:29:7:29:7 | c | |
406+
| map.cpp:16:2:16:2 | a [post update] | map.cpp:17:7:17:7 | a | |
407+
| map.cpp:16:2:16:2 | a [post update] | map.cpp:18:7:18:7 | a | |
408+
| map.cpp:16:2:16:2 | a [post update] | map.cpp:19:7:19:7 | a | |
409+
| map.cpp:16:2:16:16 | ... = ... | map.cpp:16:4:16:8 | first [post update] | |
410+
| map.cpp:16:2:16:16 | ... = ... | map.cpp:17:9:17:13 | first | |
411+
| map.cpp:16:12:16:16 | 123 | map.cpp:16:2:16:16 | ... = ... | |
412+
| map.cpp:17:7:17:7 | a [post update] | map.cpp:18:7:18:7 | a | |
413+
| map.cpp:17:7:17:7 | a [post update] | map.cpp:19:7:19:7 | a | |
414+
| map.cpp:18:7:18:7 | a [post update] | map.cpp:19:7:19:7 | a | |
415+
| map.cpp:21:2:21:2 | b [post update] | map.cpp:22:7:22:7 | b | |
416+
| map.cpp:21:2:21:2 | b [post update] | map.cpp:23:7:23:7 | b | |
417+
| map.cpp:21:2:21:2 | b [post update] | map.cpp:24:7:24:7 | b | |
418+
| map.cpp:21:2:21:19 | ... = ... | map.cpp:21:4:21:8 | first [post update] | |
419+
| map.cpp:21:2:21:19 | ... = ... | map.cpp:22:9:22:13 | first | |
420+
| map.cpp:21:12:21:17 | call to source | map.cpp:21:2:21:19 | ... = ... | |
421+
| map.cpp:22:7:22:7 | b [post update] | map.cpp:23:7:23:7 | b | |
422+
| map.cpp:22:7:22:7 | b [post update] | map.cpp:24:7:24:7 | b | |
423+
| map.cpp:23:7:23:7 | b [post update] | map.cpp:24:7:24:7 | b | |
424+
| map.cpp:26:2:26:2 | c [post update] | map.cpp:27:7:27:7 | c | |
425+
| map.cpp:26:2:26:2 | c [post update] | map.cpp:28:7:28:7 | c | |
426+
| map.cpp:26:2:26:2 | c [post update] | map.cpp:29:7:29:7 | c | |
427+
| map.cpp:26:2:26:20 | ... = ... | map.cpp:26:4:26:9 | second [post update] | |
428+
| map.cpp:26:2:26:20 | ... = ... | map.cpp:28:9:28:14 | second | |
429+
| map.cpp:26:13:26:18 | call to source | map.cpp:26:2:26:20 | ... = ... | |
430+
| map.cpp:27:7:27:7 | c [post update] | map.cpp:28:7:28:7 | c | |
431+
| map.cpp:27:7:27:7 | c [post update] | map.cpp:29:7:29:7 | c | |
432+
| map.cpp:28:7:28:7 | c [post update] | map.cpp:29:7:29:7 | c | |
433+
| map.cpp:31:30:31:42 | call to pair | map.cpp:32:7:32:7 | d | |
434+
| map.cpp:31:30:31:42 | call to pair | map.cpp:33:7:33:7 | d | |
435+
| map.cpp:31:30:31:42 | call to pair | map.cpp:34:7:34:7 | d | |
436+
| map.cpp:32:7:32:7 | d [post update] | map.cpp:33:7:33:7 | d | |
437+
| map.cpp:32:7:32:7 | d [post update] | map.cpp:34:7:34:7 | d | |
438+
| map.cpp:33:7:33:7 | d [post update] | map.cpp:34:7:34:7 | d | |
439+
| map.cpp:36:30:36:45 | call to pair | map.cpp:37:7:37:7 | e | |
440+
| map.cpp:36:30:36:45 | call to pair | map.cpp:38:7:38:7 | e | |
441+
| map.cpp:36:30:36:45 | call to pair | map.cpp:39:7:39:7 | e | |
442+
| map.cpp:37:7:37:7 | e [post update] | map.cpp:38:7:38:7 | e | |
443+
| map.cpp:37:7:37:7 | e [post update] | map.cpp:39:7:39:7 | e | |
444+
| map.cpp:38:7:38:7 | e [post update] | map.cpp:39:7:39:7 | e | |
445+
| map.cpp:41:30:41:45 | call to pair | map.cpp:42:7:42:7 | f | |
446+
| map.cpp:41:30:41:45 | call to pair | map.cpp:43:7:43:7 | f | |
447+
| map.cpp:41:30:41:45 | call to pair | map.cpp:44:7:44:7 | f | |
448+
| map.cpp:41:30:41:45 | call to pair | map.cpp:46:30:46:30 | f | |
449+
| map.cpp:41:30:41:45 | call to pair | map.cpp:47:7:47:7 | f | |
450+
| map.cpp:41:30:41:45 | call to pair | map.cpp:48:7:48:7 | f | |
451+
| map.cpp:41:30:41:45 | call to pair | map.cpp:49:7:49:7 | f | |
452+
| map.cpp:41:30:41:45 | call to pair | map.cpp:52:6:52:6 | f | |
453+
| map.cpp:42:7:42:7 | f [post update] | map.cpp:43:7:43:7 | f | |
454+
| map.cpp:42:7:42:7 | f [post update] | map.cpp:44:7:44:7 | f | |
455+
| map.cpp:42:7:42:7 | f [post update] | map.cpp:46:30:46:30 | f | |
456+
| map.cpp:42:7:42:7 | f [post update] | map.cpp:47:7:47:7 | f | |
457+
| map.cpp:42:7:42:7 | f [post update] | map.cpp:48:7:48:7 | f | |
458+
| map.cpp:42:7:42:7 | f [post update] | map.cpp:49:7:49:7 | f | |
459+
| map.cpp:42:7:42:7 | f [post update] | map.cpp:52:6:52:6 | f | |
460+
| map.cpp:43:7:43:7 | f [post update] | map.cpp:44:7:44:7 | f | |
461+
| map.cpp:43:7:43:7 | f [post update] | map.cpp:46:30:46:30 | f | |
462+
| map.cpp:43:7:43:7 | f [post update] | map.cpp:47:7:47:7 | f | |
463+
| map.cpp:43:7:43:7 | f [post update] | map.cpp:48:7:48:7 | f | |
464+
| map.cpp:43:7:43:7 | f [post update] | map.cpp:49:7:49:7 | f | |
465+
| map.cpp:43:7:43:7 | f [post update] | map.cpp:52:6:52:6 | f | |
466+
| map.cpp:47:7:47:7 | f [post update] | map.cpp:48:7:48:7 | f | |
467+
| map.cpp:47:7:47:7 | f [post update] | map.cpp:49:7:49:7 | f | |
468+
| map.cpp:47:7:47:7 | f [post update] | map.cpp:52:6:52:6 | f | |
469+
| map.cpp:48:7:48:7 | f [post update] | map.cpp:49:7:49:7 | f | |
470+
| map.cpp:48:7:48:7 | f [post update] | map.cpp:52:6:52:6 | f | |
471+
| map.cpp:52:6:52:6 | f | map.cpp:52:2:52:6 | ... = ... | |
472+
| map.cpp:52:6:52:6 | f | map.cpp:53:7:53:7 | h | |
473+
| map.cpp:52:6:52:6 | f | map.cpp:54:7:54:7 | h | |
474+
| map.cpp:52:6:52:6 | f | map.cpp:55:7:55:7 | h | |
475+
| map.cpp:53:7:53:7 | h [post update] | map.cpp:54:7:54:7 | h | |
476+
| map.cpp:53:7:53:7 | h [post update] | map.cpp:55:7:55:7 | h | |
477+
| map.cpp:54:7:54:7 | h [post update] | map.cpp:55:7:55:7 | h | |
478+
| map.cpp:57:30:57:42 | call to pair | map.cpp:61:3:61:3 | i | |
479+
| map.cpp:57:30:57:42 | call to pair | map.cpp:63:7:63:7 | i | |
480+
| map.cpp:57:30:57:42 | call to pair | map.cpp:64:7:64:7 | i | |
481+
| map.cpp:57:30:57:42 | call to pair | map.cpp:65:7:65:7 | i | |
482+
| map.cpp:58:30:58:45 | call to pair | map.cpp:61:10:61:10 | j | |
483+
| map.cpp:58:30:58:45 | call to pair | map.cpp:66:7:66:7 | j | |
484+
| map.cpp:58:30:58:45 | call to pair | map.cpp:67:7:67:7 | j | |
485+
| map.cpp:58:30:58:45 | call to pair | map.cpp:68:7:68:7 | j | |
486+
| map.cpp:59:30:59:45 | call to pair | map.cpp:62:2:62:2 | k | |
487+
| map.cpp:59:30:59:45 | call to pair | map.cpp:69:7:69:7 | k | |
488+
| map.cpp:59:30:59:45 | call to pair | map.cpp:70:7:70:7 | k | |
489+
| map.cpp:59:30:59:45 | call to pair | map.cpp:71:7:71:7 | k | |
490+
| map.cpp:60:30:60:42 | call to pair | map.cpp:62:9:62:9 | l | |
491+
| map.cpp:60:30:60:42 | call to pair | map.cpp:72:7:72:7 | l | |
492+
| map.cpp:60:30:60:42 | call to pair | map.cpp:73:7:73:7 | l | |
493+
| map.cpp:60:30:60:42 | call to pair | map.cpp:74:7:74:7 | l | |
494+
| map.cpp:61:3:61:3 | ref arg i | map.cpp:63:7:63:7 | i | |
495+
| map.cpp:61:3:61:3 | ref arg i | map.cpp:64:7:64:7 | i | |
496+
| map.cpp:61:3:61:3 | ref arg i | map.cpp:65:7:65:7 | i | |
497+
| map.cpp:61:10:61:10 | ref arg j | map.cpp:66:7:66:7 | j | |
498+
| map.cpp:61:10:61:10 | ref arg j | map.cpp:67:7:67:7 | j | |
499+
| map.cpp:61:10:61:10 | ref arg j | map.cpp:68:7:68:7 | j | |
500+
| map.cpp:62:2:62:2 | ref arg k | map.cpp:69:7:69:7 | k | |
501+
| map.cpp:62:2:62:2 | ref arg k | map.cpp:70:7:70:7 | k | |
502+
| map.cpp:62:2:62:2 | ref arg k | map.cpp:71:7:71:7 | k | |
503+
| map.cpp:62:9:62:9 | ref arg l | map.cpp:72:7:72:7 | l | |
504+
| map.cpp:62:9:62:9 | ref arg l | map.cpp:73:7:73:7 | l | |
505+
| map.cpp:62:9:62:9 | ref arg l | map.cpp:74:7:74:7 | l | |
506+
| map.cpp:63:7:63:7 | i [post update] | map.cpp:64:7:64:7 | i | |
507+
| map.cpp:63:7:63:7 | i [post update] | map.cpp:65:7:65:7 | i | |
508+
| map.cpp:64:7:64:7 | i [post update] | map.cpp:65:7:65:7 | i | |
509+
| map.cpp:66:7:66:7 | j [post update] | map.cpp:67:7:67:7 | j | |
510+
| map.cpp:66:7:66:7 | j [post update] | map.cpp:68:7:68:7 | j | |
511+
| map.cpp:67:7:67:7 | j [post update] | map.cpp:68:7:68:7 | j | |
512+
| map.cpp:69:7:69:7 | k [post update] | map.cpp:70:7:70:7 | k | |
513+
| map.cpp:69:7:69:7 | k [post update] | map.cpp:71:7:71:7 | k | |
514+
| map.cpp:70:7:70:7 | k [post update] | map.cpp:71:7:71:7 | k | |
515+
| map.cpp:72:7:72:7 | l [post update] | map.cpp:73:7:73:7 | l | |
516+
| map.cpp:72:7:72:7 | l [post update] | map.cpp:74:7:74:7 | l | |
517+
| map.cpp:73:7:73:7 | l [post update] | map.cpp:74:7:74:7 | l | |
518+
| map.cpp:76:7:76:15 | call to make_pair | map.cpp:76:7:76:29 | call to pair | TAINT |
519+
| map.cpp:79:7:79:15 | call to make_pair | map.cpp:79:7:79:32 | call to pair | TAINT |
520+
| map.cpp:82:7:82:15 | call to make_pair | map.cpp:82:7:82:32 | call to pair | TAINT |
521+
| map.cpp:87:6:87:14 | call to make_pair | map.cpp:87:6:87:49 | call to pair | TAINT |
522+
| map.cpp:87:6:87:49 | call to pair | map.cpp:87:2:87:49 | ... = ... | |
523+
| map.cpp:87:6:87:49 | call to pair | map.cpp:88:7:88:7 | m | |
524+
| map.cpp:87:6:87:49 | call to pair | map.cpp:89:7:89:7 | m | |
525+
| map.cpp:87:6:87:49 | call to pair | map.cpp:90:7:90:7 | m | |
526+
| map.cpp:87:6:87:49 | call to pair | map.cpp:91:7:91:7 | m | |
527+
| map.cpp:87:6:87:49 | call to pair | map.cpp:92:7:92:7 | m | |
528+
| map.cpp:88:7:88:7 | m | map.cpp:88:7:88:7 | call to pair | TAINT |
529+
| map.cpp:90:7:90:7 | m [post update] | map.cpp:91:7:91:7 | m | |
530+
| map.cpp:90:7:90:7 | m [post update] | map.cpp:92:7:92:7 | m | |
531+
| map.cpp:91:7:91:7 | m [post update] | map.cpp:92:7:92:7 | m | |
393532
| movableclass.cpp:8:2:8:15 | this | movableclass.cpp:8:27:8:31 | constructor init of field v [pre-this] | |
394533
| movableclass.cpp:8:21:8:22 | _v | movableclass.cpp:8:29:8:30 | _v | |
395534
| movableclass.cpp:8:29:8:30 | _v | movableclass.cpp:8:27:8:31 | constructor init of field v | TAINT |
@@ -514,12 +653,22 @@
514653
| standalone_iterators.cpp:51:37:51:43 | source1 | standalone_iterators.cpp:53:12:53:18 | source1 | |
515654
| standalone_iterators.cpp:51:37:51:43 | source1 | standalone_iterators.cpp:54:14:54:20 | source1 | |
516655
| standalone_iterators.cpp:53:12:53:18 | ref arg source1 | standalone_iterators.cpp:54:14:54:20 | source1 | |
517-
| stl.h:216:30:216:40 | call to allocator | stl.h:216:21:216:41 | noexcept(...) | TAINT |
518-
| stl.h:216:30:216:40 | call to allocator | stl.h:216:21:216:41 | noexcept(...) | TAINT |
519-
| stl.h:216:30:216:40 | call to allocator | stl.h:216:21:216:41 | noexcept(...) | TAINT |
520-
| stl.h:216:30:216:40 | call to allocator | stl.h:216:21:216:41 | noexcept(...) | TAINT |
521-
| stl.h:216:30:216:40 | call to allocator | stl.h:216:21:216:41 | noexcept(...) | TAINT |
522-
| stl.h:216:53:216:63 | 0 | stl.h:216:46:216:64 | (no string representation) | TAINT |
656+
| stl.h:221:30:221:40 | call to allocator | stl.h:221:21:221:41 | noexcept(...) | TAINT |
657+
| stl.h:221:30:221:40 | call to allocator | stl.h:221:21:221:41 | noexcept(...) | TAINT |
658+
| stl.h:221:30:221:40 | call to allocator | stl.h:221:21:221:41 | noexcept(...) | TAINT |
659+
| stl.h:221:30:221:40 | call to allocator | stl.h:221:21:221:41 | noexcept(...) | TAINT |
660+
| stl.h:221:30:221:40 | call to allocator | stl.h:221:21:221:41 | noexcept(...) | TAINT |
661+
| stl.h:221:53:221:63 | 0 | stl.h:221:46:221:64 | (no string representation) | TAINT |
662+
| stl.h:314:9:314:9 | Unknown literal | stl.h:314:9:314:9 | constructor init of field first | TAINT |
663+
| stl.h:314:9:314:9 | Unknown literal | stl.h:314:9:314:9 | constructor init of field first | TAINT |
664+
| stl.h:314:9:314:9 | Unknown literal | stl.h:314:9:314:9 | constructor init of field second | TAINT |
665+
| stl.h:314:9:314:9 | Unknown literal | stl.h:314:9:314:9 | constructor init of field second | TAINT |
666+
| stl.h:314:9:314:9 | constructor init of field first [post-this] | stl.h:314:9:314:9 | constructor init of field second [pre-this] | |
667+
| stl.h:314:9:314:9 | constructor init of field first [post-this] | stl.h:314:9:314:9 | constructor init of field second [pre-this] | |
668+
| stl.h:314:9:314:9 | constructor init of field first [pre-this] | stl.h:314:9:314:9 | constructor init of field second [pre-this] | |
669+
| stl.h:314:9:314:9 | constructor init of field first [pre-this] | stl.h:314:9:314:9 | constructor init of field second [pre-this] | |
670+
| stl.h:314:9:314:9 | this | stl.h:314:9:314:9 | constructor init of field first [pre-this] | |
671+
| stl.h:314:9:314:9 | this | stl.h:314:9:314:9 | constructor init of field first [pre-this] | |
523672
| string.cpp:24:12:24:17 | call to source | string.cpp:28:7:28:7 | a | |
524673
| string.cpp:25:16:25:20 | 123 | string.cpp:25:16:25:21 | call to basic_string | TAINT |
525674
| string.cpp:25:16:25:21 | call to basic_string | string.cpp:29:7:29:7 | b | |
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
2+
#include "stl.h"
3+
4+
using namespace std;
5+
6+
char *source();
7+
8+
void sink(char *);
9+
void sink(const char *);
10+
void sink(std::pair<char *, char *>);
11+
12+
void test_pair()
13+
{
14+
std::pair<char *, char *> a, b, c;
15+
16+
a.first = "123";
17+
sink(a.first);
18+
sink(a.second);
19+
sink(a);
20+
21+
b.first = source();
22+
sink(b.first); // tainted
23+
sink(b.second);
24+
sink(b); // tainted [NOT DETECTED]
25+
26+
c.second = source();
27+
sink(c.first);
28+
sink(c.second); // tainted
29+
sink(c); // tainted [NOT DETECTED]
30+
31+
std::pair<char *, char *> d("123", "456");
32+
sink(d.first);
33+
sink(d.second);
34+
sink(d);
35+
36+
std::pair<char *, char *> e(source(), "456");
37+
sink(e.first); // tainted [NOT DETECTED]
38+
sink(e.second);
39+
sink(e); // tainted [NOT DETECTED]
40+
41+
std::pair<char *, char *> f("123", source());
42+
sink(f.first);
43+
sink(f.second); // tainted [NOT DETECTED]
44+
sink(f); // tainted [NOT DETECTED]
45+
46+
std::pair<char *, char *> g(f);
47+
sink(f.first);
48+
sink(f.second); // tainted [NOT DETECTED]
49+
sink(f); // tainted [NOT DETECTED]
50+
51+
std::pair<char *, char *> h;
52+
h = f;
53+
sink(h.first);
54+
sink(h.second); // tainted [NOT DETECTED]
55+
sink(h); // tainted [NOT DETECTED]
56+
57+
std::pair<char *, char *> i("123", "456");
58+
std::pair<char *, char *> j("123", source());
59+
std::pair<char *, char *> k("123", source());
60+
std::pair<char *, char *> l("123", "456");
61+
i.swap(j);
62+
k.swap(l);
63+
sink(i.first);
64+
sink(i.second); // tainted [NOT DETECTED]
65+
sink(i); // tainted [NOT DETECTED]
66+
sink(j.first);
67+
sink(j.second);
68+
sink(j);
69+
sink(k.first);
70+
sink(k.second);
71+
sink(k);
72+
sink(l.first);
73+
sink(l.second); // tainted [NOT DETECTED]
74+
sink(l); // tainted [NOT DETECTED]
75+
76+
sink(make_pair("123", "456"));
77+
sink(make_pair("123", "456").first);
78+
sink(make_pair("123", "456").second);
79+
sink(make_pair(source(), "456")); // tainted [NOT DETECTED]
80+
sink(make_pair(source(), "456").first); // tainted [NOT DETECTED]
81+
sink(make_pair(source(), "456").second);
82+
sink(make_pair("123", source())); // tainted [NOT DETECTED]
83+
sink(make_pair("123", source()).first);
84+
sink(make_pair("123", source()).second); // tainted [NOT DETECTED]
85+
86+
std::pair<std::pair<char *, char *>, char *> m;
87+
m = make_pair(make_pair("123", source()), "789");
88+
sink(m); // tainted [NOT DETECTED]
89+
sink(m.first); // tainted [NOT DETECTED]
90+
sink(m.first.first);
91+
sink(m.first.second); // tainted [NOT DETECTED]
92+
sink(m.second);
93+
}

cpp/ql/test/library-tests/dataflow/taint-tests/stl.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,24 @@ namespace std {
305305
template<typename T, class... Args> unique_ptr<T> make_unique(Args&&...);
306306

307307
template<typename T, class... Args> shared_ptr<T> make_shared(Args&&...);
308-
}
308+
}
309+
310+
// --- pair ---
311+
312+
namespace std {
313+
template <class T1, class T2>
314+
struct pair {
315+
typedef T1 first_type;
316+
typedef T2 second_type;
317+
318+
T1 first;
319+
T2 second;
320+
pair();
321+
pair(const T1& x, const T2& y);
322+
template<class U, class V> pair(const pair<U, V> &p);
323+
324+
void swap(pair& p) /*noexcept(...)*/;
325+
};
326+
327+
template <class T1, class T2> pair<T1,T2> make_pair(T1, T2);
328+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
| format.cpp:115:8:115:13 | buffer | format.cpp:114:37:114:50 | call to source |
3434
| format.cpp:157:7:157:22 | access to array | format.cpp:147:12:147:25 | call to source |
3535
| format.cpp:158:7:158:27 | ... + ... | format.cpp:148:16:148:30 | call to source |
36+
| map.cpp:22:9:22:13 | first | map.cpp:21:12:21:17 | call to source |
37+
| map.cpp:28:9:28:14 | second | map.cpp:26:13:26:18 | call to source |
3638
| movableclass.cpp:44:8:44:9 | s1 | movableclass.cpp:39:21:39:26 | call to source |
3739
| movableclass.cpp:45:8:45:9 | s2 | movableclass.cpp:40:23:40:28 | call to source |
3840
| movableclass.cpp:46:8:46:9 | s3 | movableclass.cpp:42:8:42:13 | call to source |

cpp/ql/test/library-tests/dataflow/taint-tests/test_ir.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
| format.cpp:115:8:115:13 | Argument 0 indirection | format.cpp:114:37:114:50 | call to source |
4343
| format.cpp:157:7:157:22 | access to array | format.cpp:147:12:147:25 | call to source |
4444
| format.cpp:158:7:158:27 | ... + ... | format.cpp:148:16:148:30 | call to source |
45+
| map.cpp:22:9:22:13 | first | map.cpp:21:12:21:17 | call to source |
46+
| map.cpp:28:9:28:14 | second | map.cpp:26:13:26:18 | call to source |
4547
| movableclass.cpp:44:8:44:9 | s1 | movableclass.cpp:39:21:39:26 | call to source |
4648
| movableclass.cpp:45:8:45:9 | s2 | movableclass.cpp:40:23:40:28 | call to source |
4749
| movableclass.cpp:46:8:46:9 | s3 | movableclass.cpp:42:8:42:13 | call to source |

0 commit comments

Comments
 (0)