Skip to content

Commit 58832a5

Browse files
committed
C++: Accept test changes.
1 parent 9f8c961 commit 58832a5

File tree

21 files changed

+236
-236
lines changed

21 files changed

+236
-236
lines changed

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-190/AllocMultiplicationOverflow/AllocMultiplicationOverflow.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
edges
2-
| test.cpp:22:17:22:21 | (size_t)... | test.cpp:23:33:23:37 | size1 | provenance | |
3-
| test.cpp:22:17:22:21 | ... * ... | test.cpp:22:17:22:21 | (size_t)... | provenance | |
2+
| test.cpp:22:17:22:21 | ... * ... | test.cpp:22:17:22:21 | ... * ... | provenance | |
3+
| test.cpp:22:17:22:21 | ... * ... | test.cpp:23:33:23:37 | size1 | provenance | |
44
| test.cpp:37:24:37:27 | size | test.cpp:37:46:37:49 | size | provenance | |
55
| test.cpp:45:36:45:40 | ... * ... | test.cpp:37:24:37:27 | size | provenance | |
66
nodes
77
| test.cpp:13:33:13:37 | ... * ... | semmle.label | ... * ... |
88
| test.cpp:15:31:15:35 | ... * ... | semmle.label | ... * ... |
99
| test.cpp:19:34:19:38 | ... * ... | semmle.label | ... * ... |
10-
| test.cpp:22:17:22:21 | (size_t)... | semmle.label | (size_t)... |
10+
| test.cpp:22:17:22:21 | ... * ... | semmle.label | ... * ... |
1111
| test.cpp:22:17:22:21 | ... * ... | semmle.label | ... * ... |
1212
| test.cpp:23:33:23:37 | size1 | semmle.label | size1 |
1313
| test.cpp:30:18:30:32 | ... * ... | semmle.label | ... * ... |

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-193/constant-size/ConstantSizeArrayOffByOne.expected

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ edges
1818
| test.cpp:77:32:77:34 | buf | test.cpp:77:26:77:44 | & ... | provenance | |
1919
| test.cpp:79:27:79:34 | buf | test.cpp:70:33:70:33 | p | provenance | |
2020
| test.cpp:79:32:79:34 | buf | test.cpp:79:27:79:34 | buf | provenance | |
21-
| test.cpp:85:21:85:36 | (char *)... | test.cpp:87:5:87:31 | access to array | provenance | |
22-
| test.cpp:85:21:85:36 | (char *)... | test.cpp:88:5:88:27 | access to array | provenance | |
23-
| test.cpp:85:34:85:36 | buf | test.cpp:85:21:85:36 | (char *)... | provenance | |
21+
| test.cpp:85:21:85:36 | buf | test.cpp:87:5:87:31 | access to array | provenance | |
22+
| test.cpp:85:21:85:36 | buf | test.cpp:88:5:88:27 | access to array | provenance | |
23+
| test.cpp:85:34:85:36 | buf | test.cpp:85:21:85:36 | buf | provenance | |
2424
| test.cpp:96:13:96:15 | arr | test.cpp:96:13:96:18 | access to array | provenance | |
2525
| test.cpp:111:17:111:19 | arr | test.cpp:111:17:111:22 | access to array | provenance | |
2626
| test.cpp:111:17:111:19 | arr | test.cpp:115:35:115:40 | access to array | provenance | |
@@ -42,12 +42,12 @@ edges
4242
| test.cpp:156:12:156:18 | ... + ... | test.cpp:156:12:156:18 | ... + ... | provenance | |
4343
| test.cpp:156:12:156:18 | ... + ... | test.cpp:158:17:158:18 | *& ... | provenance | |
4444
| test.cpp:158:17:158:18 | *& ... | test.cpp:146:26:146:26 | *p | provenance | |
45-
| test.cpp:218:16:218:28 | (int *)... | test.cpp:220:5:220:11 | access to array | provenance | |
46-
| test.cpp:218:16:218:28 | (int *)... | test.cpp:221:5:221:11 | access to array | provenance | |
47-
| test.cpp:218:23:218:28 | buffer | test.cpp:218:16:218:28 | (int *)... | provenance | |
48-
| test.cpp:229:17:229:29 | (vec2 *)... | test.cpp:231:5:231:10 | access to array | provenance | |
49-
| test.cpp:229:17:229:29 | (vec2 *)... | test.cpp:232:5:232:10 | access to array | provenance | |
50-
| test.cpp:229:25:229:29 | array | test.cpp:229:17:229:29 | (vec2 *)... | provenance | |
45+
| test.cpp:218:16:218:28 | buffer | test.cpp:220:5:220:11 | access to array | provenance | |
46+
| test.cpp:218:16:218:28 | buffer | test.cpp:221:5:221:11 | access to array | provenance | |
47+
| test.cpp:218:23:218:28 | buffer | test.cpp:218:16:218:28 | buffer | provenance | |
48+
| test.cpp:229:17:229:29 | array | test.cpp:231:5:231:10 | access to array | provenance | |
49+
| test.cpp:229:17:229:29 | array | test.cpp:232:5:232:10 | access to array | provenance | |
50+
| test.cpp:229:25:229:29 | array | test.cpp:229:17:229:29 | array | provenance | |
5151
| test.cpp:245:30:245:30 | p | test.cpp:261:27:261:30 | access to array | provenance | |
5252
| test.cpp:245:30:245:30 | p | test.cpp:261:27:261:30 | access to array | provenance | |
5353
| test.cpp:274:14:274:20 | buffer3 | test.cpp:245:30:245:30 | p | provenance | |
@@ -111,7 +111,7 @@ nodes
111111
| test.cpp:77:32:77:34 | buf | semmle.label | buf |
112112
| test.cpp:79:27:79:34 | buf | semmle.label | buf |
113113
| test.cpp:79:32:79:34 | buf | semmle.label | buf |
114-
| test.cpp:85:21:85:36 | (char *)... | semmle.label | (char *)... |
114+
| test.cpp:85:21:85:36 | buf | semmle.label | buf |
115115
| test.cpp:85:34:85:36 | buf | semmle.label | buf |
116116
| test.cpp:87:5:87:31 | access to array | semmle.label | access to array |
117117
| test.cpp:88:5:88:27 | access to array | semmle.label | access to array |
@@ -137,11 +137,11 @@ nodes
137137
| test.cpp:156:12:156:18 | ... + ... | semmle.label | ... + ... |
138138
| test.cpp:156:12:156:18 | ... + ... | semmle.label | ... + ... |
139139
| test.cpp:158:17:158:18 | *& ... | semmle.label | *& ... |
140-
| test.cpp:218:16:218:28 | (int *)... | semmle.label | (int *)... |
140+
| test.cpp:218:16:218:28 | buffer | semmle.label | buffer |
141141
| test.cpp:218:23:218:28 | buffer | semmle.label | buffer |
142142
| test.cpp:220:5:220:11 | access to array | semmle.label | access to array |
143143
| test.cpp:221:5:221:11 | access to array | semmle.label | access to array |
144-
| test.cpp:229:17:229:29 | (vec2 *)... | semmle.label | (vec2 *)... |
144+
| test.cpp:229:17:229:29 | array | semmle.label | array |
145145
| test.cpp:229:25:229:29 | array | semmle.label | array |
146146
| test.cpp:231:5:231:10 | access to array | semmle.label | access to array |
147147
| test.cpp:232:5:232:10 | access to array | semmle.label | access to array |

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-416/IteratorToExpiredContainer.expected

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
| test.cpp:680:30:680:30 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:680:17:680:17 | call to end | call to end |
33
| test.cpp:683:31:683:32 | call to at | This object is destroyed before $@ is called. | test.cpp:683:17:683:17 | call to begin | call to begin |
44
| test.cpp:683:31:683:32 | call to at | This object is destroyed before $@ is called. | test.cpp:683:17:683:17 | call to end | call to end |
5-
| test.cpp:689:17:689:29 | temporary object | This object is destroyed before $@ is called. | test.cpp:689:31:689:35 | call to begin | call to begin |
6-
| test.cpp:689:46:689:58 | temporary object | This object is destroyed before $@ is called. | test.cpp:689:60:689:62 | call to end | call to end |
5+
| test.cpp:689:17:689:29 | call to returnValue | This object is destroyed before $@ is called. | test.cpp:689:31:689:35 | call to begin | call to begin |
6+
| test.cpp:689:46:689:58 | call to returnValue | This object is destroyed before $@ is called. | test.cpp:689:60:689:62 | call to end | call to end |
77
| test.cpp:702:27:702:27 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:703:19:703:23 | call to begin | call to begin |
88
| test.cpp:702:27:702:27 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:703:36:703:38 | call to end | call to end |
9-
| test.cpp:716:36:716:48 | temporary object | This object is destroyed before $@ is called. | test.cpp:716:17:716:17 | call to begin | call to begin |
10-
| test.cpp:716:36:716:48 | temporary object | This object is destroyed before $@ is called. | test.cpp:716:17:716:17 | call to end | call to end |
9+
| test.cpp:716:36:716:48 | call to returnValue | This object is destroyed before $@ is called. | test.cpp:716:17:716:17 | call to begin | call to begin |
10+
| test.cpp:716:36:716:48 | call to returnValue | This object is destroyed before $@ is called. | test.cpp:716:17:716:17 | call to end | call to end |
1111
| test.cpp:727:23:727:23 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:750:17:750:17 | call to begin | call to begin |
1212
| test.cpp:727:23:727:23 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:750:17:750:17 | call to end | call to end |
1313
| test.cpp:735:23:735:23 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:759:17:759:17 | call to begin | call to begin |
1414
| test.cpp:735:23:735:23 | call to operator[] | This object is destroyed before $@ is called. | test.cpp:759:17:759:17 | call to end | call to end |
15-
| test.cpp:771:44:771:56 | temporary object | This object is destroyed before $@ is called. | test.cpp:772:35:772:35 | call to begin | call to begin |
16-
| test.cpp:771:44:771:56 | temporary object | This object is destroyed before $@ is called. | test.cpp:772:35:772:35 | call to end | call to end |
15+
| test.cpp:771:44:771:56 | call to returnValue | This object is destroyed before $@ is called. | test.cpp:772:35:772:35 | call to begin | call to begin |
16+
| test.cpp:771:44:771:56 | call to returnValue | This object is destroyed before $@ is called. | test.cpp:772:35:772:35 | call to end | call to end |

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125
| test.cpp:384:16:384:23 | *& ... | test.cpp:384:3:384:8 | *call to memcpy |
126126
| test.cpp:384:16:384:23 | *& ... | test.cpp:384:10:384:13 | memcpy output argument |
127127
| test.cpp:384:16:384:23 | *& ... | test.cpp:384:16:384:23 | *& ... |
128-
| test.cpp:384:16:384:23 | **(const void *)... | test.cpp:384:3:384:8 | **call to memcpy |
129-
| test.cpp:384:16:384:23 | **(const void *)... | test.cpp:384:10:384:13 | memcpy output argument |
128+
| test.cpp:384:16:384:23 | **& ... | test.cpp:384:3:384:8 | **call to memcpy |
129+
| test.cpp:384:16:384:23 | **& ... | test.cpp:384:10:384:13 | memcpy output argument |
130130
| test.cpp:384:17:384:23 | *source1 | test.cpp:384:16:384:23 | *& ... |
131131
| test.cpp:384:17:384:23 | source1 | test.cpp:384:16:384:23 | & ... |
132132
| test.cpp:388:53:388:59 | source1 | test.cpp:391:16:391:23 | *& ... |
@@ -152,8 +152,8 @@
152152
| test.cpp:391:16:391:23 | *& ... | test.cpp:391:3:391:8 | *call to memcpy |
153153
| test.cpp:391:16:391:23 | *& ... | test.cpp:391:10:391:13 | memcpy output argument |
154154
| test.cpp:391:16:391:23 | *& ... | test.cpp:391:16:391:23 | *& ... |
155-
| test.cpp:391:16:391:23 | **(const void *)... | test.cpp:391:3:391:8 | **call to memcpy |
156-
| test.cpp:391:16:391:23 | **(const void *)... | test.cpp:391:10:391:13 | memcpy output argument |
155+
| test.cpp:391:16:391:23 | **& ... | test.cpp:391:3:391:8 | **call to memcpy |
156+
| test.cpp:391:16:391:23 | **& ... | test.cpp:391:10:391:13 | memcpy output argument |
157157
| test.cpp:391:17:391:23 | *source1 | test.cpp:391:16:391:23 | *& ... |
158158
| test.cpp:391:17:391:23 | source1 | test.cpp:391:16:391:23 | & ... |
159159
| test.cpp:392:8:392:10 | tmp | test.cpp:394:10:394:12 | tmp |

cpp/ql/test/library-tests/dataflow/dataflow-tests/type-bugs.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ incorrectBaseType
77
| flowOut.cpp:84:9:84:10 | *& ... | Expected 'Node.getType()' to be int, but it was int * |
88
| flowOut.cpp:101:13:101:14 | *& ... | Expected 'Node.getType()' to be int, but it was int * |
99
| self_parameter_flow.cpp:8:8:8:9 | *& ... | Expected 'Node.getType()' to be unsigned char, but it was unsigned char * |
10-
| test.cpp:67:28:67:37 | (reference dereference) | Expected 'Node.getType()' to be const int, but it was int * |
10+
| test.cpp:67:28:67:37 | call to move | Expected 'Node.getType()' to be const int, but it was int * |
1111
| test.cpp:531:39:531:40 | *& ... | Expected 'Node.getType()' to be int, but it was const int * |
1212
| test.cpp:615:13:615:21 | *& ... | Expected 'Node.getType()' to be int, but it was void |
1313
| test.cpp:704:22:704:25 | *& ... | Expected 'Node.getType()' to be int, but it was int * |
1414
| test.cpp:715:24:715:25 | *& ... | Expected 'Node.getType()' to be unsigned char, but it was unsigned char * |
15-
| test.cpp:848:23:848:25 | (reference dereference) | Expected 'Node.getType()' to be int, but it was int * |
15+
| test.cpp:848:23:848:25 | rpx | Expected 'Node.getType()' to be int, but it was int * |
1616
| test.cpp:854:10:854:36 | * ... | Expected 'Node.getType()' to be const int, but it was int |
1717
| test.cpp:867:10:867:30 | * ... | Expected 'Node.getType()' to be const int, but it was int |
1818
| test.cpp:1062:52:1062:53 | *& ... | Expected 'Node.getType()' to be char, but it was char * |

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ edges
5858
| A.cpp:100:5:100:6 | *c1 [post update] [a] | A.cpp:101:8:101:9 | *c1 [a] | provenance | |
5959
| A.cpp:100:5:100:13 | ... = ... | A.cpp:100:5:100:6 | *c1 [post update] [a] | provenance | |
6060
| A.cpp:101:8:101:9 | *c1 [a] | A.cpp:103:14:103:14 | *c [a] | provenance | |
61-
| A.cpp:103:14:103:14 | *c [a] | A.cpp:105:18:105:38 | *dynamic_cast<C1 *>... [a] | provenance | |
62-
| A.cpp:103:14:103:14 | *c [a] | A.cpp:110:18:110:38 | *dynamic_cast<C2 *>... [a] | provenance | |
63-
| A.cpp:105:18:105:38 | *dynamic_cast<C1 *>... [a] | A.cpp:107:12:107:13 | *c1 [a] | provenance | |
61+
| A.cpp:103:14:103:14 | *c [a] | A.cpp:105:18:105:38 | *c [a] | provenance | |
62+
| A.cpp:103:14:103:14 | *c [a] | A.cpp:110:18:110:38 | *c [a] | provenance | |
63+
| A.cpp:105:18:105:38 | *c [a] | A.cpp:107:12:107:13 | *c1 [a] | provenance | |
6464
| A.cpp:107:12:107:13 | *c1 [a] | A.cpp:107:12:107:16 | a | provenance | |
65-
| A.cpp:110:18:110:38 | *dynamic_cast<C2 *>... [a] | A.cpp:112:7:112:13 | *... = ... [a] | provenance | |
66-
| A.cpp:112:7:112:13 | *... = ... [a] | A.cpp:118:18:118:39 | *dynamic_cast<C1 *>... [a] | provenance | |
67-
| A.cpp:118:18:118:39 | *dynamic_cast<C1 *>... [a] | A.cpp:120:12:120:13 | *c1 [a] | provenance | |
65+
| A.cpp:110:18:110:38 | *c [a] | A.cpp:112:7:112:13 | *... = ... [a] | provenance | |
66+
| A.cpp:112:7:112:13 | *... = ... [a] | A.cpp:118:18:118:39 | *cc [a] | provenance | |
67+
| A.cpp:118:18:118:39 | *cc [a] | A.cpp:120:12:120:13 | *c1 [a] | provenance | |
6868
| A.cpp:120:12:120:13 | *c1 [a] | A.cpp:120:12:120:16 | a | provenance | |
6969
| A.cpp:124:14:124:14 | *b [c] | A.cpp:131:8:131:8 | f7 output argument [c] | provenance | |
7070
| A.cpp:126:5:126:5 | set output argument [c] | A.cpp:124:14:124:14 | *b [c] | provenance | |
@@ -906,12 +906,12 @@ nodes
906906
| A.cpp:100:5:100:13 | ... = ... | semmle.label | ... = ... |
907907
| A.cpp:101:8:101:9 | *c1 [a] | semmle.label | *c1 [a] |
908908
| A.cpp:103:14:103:14 | *c [a] | semmle.label | *c [a] |
909-
| A.cpp:105:18:105:38 | *dynamic_cast<C1 *>... [a] | semmle.label | *dynamic_cast<C1 *>... [a] |
909+
| A.cpp:105:18:105:38 | *c [a] | semmle.label | *c [a] |
910910
| A.cpp:107:12:107:13 | *c1 [a] | semmle.label | *c1 [a] |
911911
| A.cpp:107:12:107:16 | a | semmle.label | a |
912-
| A.cpp:110:18:110:38 | *dynamic_cast<C2 *>... [a] | semmle.label | *dynamic_cast<C2 *>... [a] |
912+
| A.cpp:110:18:110:38 | *c [a] | semmle.label | *c [a] |
913913
| A.cpp:112:7:112:13 | *... = ... [a] | semmle.label | *... = ... [a] |
914-
| A.cpp:118:18:118:39 | *dynamic_cast<C1 *>... [a] | semmle.label | *dynamic_cast<C1 *>... [a] |
914+
| A.cpp:118:18:118:39 | *cc [a] | semmle.label | *cc [a] |
915915
| A.cpp:120:12:120:13 | *c1 [a] | semmle.label | *c1 [a] |
916916
| A.cpp:120:12:120:16 | a | semmle.label | a |
917917
| A.cpp:124:14:124:14 | *b [c] | semmle.label | *b [c] |

0 commit comments

Comments
 (0)