Skip to content

Commit 773bc48

Browse files
committed
C++: Use a more modern make_pair.
1 parent 759324c commit 773bc48

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@
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 | |
264263
| format.cpp:16:21:16:21 | s | format.cpp:22:22:22:22 | s | |
265264
| format.cpp:16:31:16:31 | n | format.cpp:22:25:22:25 | n | |
266265
| format.cpp:16:46:16:51 | format | format.cpp:22:28:22:33 | format | |
@@ -1989,15 +1988,10 @@
19891988
| stl.h:222:30:222:40 | call to allocator | stl.h:222:21:222:41 | noexcept(...) | TAINT |
19901989
| stl.h:222:53:222:63 | 0 | stl.h:222:46:222:64 | (no string representation) | TAINT |
19911990
| stl.h:315:9:315:9 | Unknown literal | stl.h:315:9:315:9 | constructor init of field first | TAINT |
1992-
| stl.h:315:9:315:9 | Unknown literal | stl.h:315:9:315:9 | constructor init of field first | TAINT |
1993-
| stl.h:315:9:315:9 | Unknown literal | stl.h:315:9:315:9 | constructor init of field second | TAINT |
19941991
| stl.h:315:9:315:9 | Unknown literal | stl.h:315:9:315:9 | constructor init of field second | TAINT |
19951992
| stl.h:315:9:315:9 | constructor init of field first [post-this] | stl.h:315:9:315:9 | constructor init of field second [pre-this] | |
1996-
| stl.h:315:9:315:9 | constructor init of field first [post-this] | stl.h:315:9:315:9 | constructor init of field second [pre-this] | |
1997-
| stl.h:315:9:315:9 | constructor init of field first [pre-this] | stl.h:315:9:315:9 | constructor init of field second [pre-this] | |
19981993
| stl.h:315:9:315:9 | constructor init of field first [pre-this] | stl.h:315:9:315:9 | constructor init of field second [pre-this] | |
19991994
| stl.h:315:9:315:9 | this | stl.h:315:9:315:9 | constructor init of field first [pre-this] | |
2000-
| stl.h:315:9:315:9 | this | stl.h:315:9:315:9 | constructor init of field first [pre-this] | |
20011995
| string.cpp:24:12:24:17 | call to source | string.cpp:28:7:28:7 | a | |
20021996
| string.cpp:25:16:25:20 | 123 | string.cpp:25:16:25:21 | call to basic_string | TAINT |
20031997
| string.cpp:25:16:25:21 | call to basic_string | string.cpp:29:7:29:7 | b | |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ namespace std {
325325
void swap(pair& p) /*noexcept(...)*/;
326326
};
327327

328-
template <class T1, class T2> pair<T1,T2> make_pair(T1, T2);
328+
template<class T1, class T2> constexpr pair<T1, T2> make_pair(T1&&, T2&&);
329329
}
330330

331331
// --- map ---

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
| map.cpp:76:9:76:13 | map.cpp:63:37:63:42 | IR only |
3535
| map.cpp:77:9:77:14 | map.cpp:63:37:63:42 | IR only |
3636
| map.cpp:84:34:84:38 | map.cpp:84:17:84:22 | IR only |
37+
| map.cpp:85:7:85:39 | map.cpp:85:17:85:22 | IR only |
3738
| map.cpp:85:34:85:39 | map.cpp:85:17:85:22 | IR only |
39+
| map.cpp:87:7:87:38 | map.cpp:87:24:87:29 | IR only |
3840
| map.cpp:87:34:87:38 | map.cpp:87:24:87:29 | IR only |
3941
| map.cpp:88:34:88:39 | map.cpp:88:24:88:29 | IR only |
4042
| map.cpp:92:7:92:7 | map.cpp:91:33:91:38 | AST only |

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
@@ -70,8 +70,10 @@
7070
| map.cpp:78:7:78:7 | l | map.cpp:63:37:63:42 | call to source |
7171
| map.cpp:83:7:83:32 | call to pair | map.cpp:83:17:83:22 | call to source |
7272
| map.cpp:84:34:84:38 | first | map.cpp:84:17:84:22 | call to source |
73+
| map.cpp:85:7:85:39 | (reference dereference) | map.cpp:85:17:85:22 | call to source |
7374
| map.cpp:85:34:85:39 | second | map.cpp:85:17:85:22 | call to source |
7475
| map.cpp:86:7:86:32 | call to pair | map.cpp:86:24:86:29 | call to source |
76+
| map.cpp:87:7:87:38 | (reference dereference) | map.cpp:87:24:87:29 | call to source |
7577
| map.cpp:87:34:87:38 | first | map.cpp:87:24:87:29 | call to source |
7678
| map.cpp:88:34:88:39 | second | map.cpp:88:24:88:29 | call to source |
7779
| map.cpp:93:9:93:13 | first | map.cpp:91:33:91:38 | call to source |

0 commit comments

Comments
 (0)