File tree Expand file tree Collapse file tree 8 files changed +34
-0
lines changed
cpp/ql/test/library-tests/defuse Expand file tree Collapse file tree 8 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 77
77
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:46:11:46:11 | n |
78
78
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:49:5:49:7 | ... ++ |
79
79
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:53:22:53:22 | i |
80
+ | pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:60:10:60:11 | 2 |
81
+ | pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:66:12:66:18 | 0 |
80
82
| test.cpp:4:7:4:7 | a | test.cpp:5:3:5:8 | ... = ... |
81
83
| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... |
82
84
| test.cpp:4:7:4:7 | a | test.cpp:19:5:19:9 | ... = ... |
Original file line number Diff line number Diff line change 75
75
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:46:11:46:11 | n | pass_by_ref.cpp:53:22:53:22 | i |
76
76
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:49:5:49:7 | ... ++ | pass_by_ref.cpp:53:22:53:22 | i |
77
77
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:53:22:53:22 | i | pass_by_ref.cpp:54:10:54:10 | i |
78
+ | pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:60:10:60:11 | 2 | pass_by_ref.cpp:61:35:61:35 | x |
79
+ | pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:60:10:60:11 | 2 | pass_by_ref.cpp:62:10:62:10 | x |
80
+ | pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:66:12:66:18 | 0 | pass_by_ref.cpp:67:34:67:34 | p |
81
+ | pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:66:12:66:18 | 0 | pass_by_ref.cpp:68:10:68:10 | p |
78
82
| test.cpp:4:7:4:7 | a | test.cpp:5:3:5:8 | ... = ... | test.cpp:9:7:9:7 | a |
79
83
| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... | test.cpp:14:7:14:7 | a |
80
84
| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... | test.cpp:18:7:18:7 | a |
Original file line number Diff line number Diff line change 17
17
| pass_by_ref.cpp:31:7:31:9 | arr | pass_by_ref.cpp:31:15:31:18 | {...} | pass_by_ref.cpp:31:15:31:18 | {...} |
18
18
| pass_by_ref.cpp:37:7:37:9 | arr | pass_by_ref.cpp:37:15:37:18 | {...} | pass_by_ref.cpp:37:15:37:18 | {...} |
19
19
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:46:11:46:11 | n | pass_by_ref.cpp:46:11:46:11 | n |
20
+ | pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:60:10:60:11 | 2 | pass_by_ref.cpp:60:10:60:11 | 2 |
21
+ | pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:66:12:66:18 | 0 | pass_by_ref.cpp:66:12:66:18 | 0 |
20
22
| test.cpp:4:7:4:7 | a | test.cpp:5:3:5:8 | ... = ... | test.cpp:5:7:5:8 | a0 |
21
23
| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... | test.cpp:13:7:13:7 | b |
22
24
| test.cpp:4:7:4:7 | a | test.cpp:19:5:19:9 | ... = ... | test.cpp:19:9:19:9 | 1 |
Original file line number Diff line number Diff line change 151
151
| pass_by_ref.cpp:49:5:49:5 | i | |
152
152
| pass_by_ref.cpp:53:22:53:22 | i | non-const address |
153
153
| pass_by_ref.cpp:54:10:54:10 | i | |
154
+ | pass_by_ref.cpp:61:35:61:35 | x | const address |
155
+ | pass_by_ref.cpp:62:10:62:10 | x | |
156
+ | pass_by_ref.cpp:67:34:67:34 | p | const address |
157
+ | pass_by_ref.cpp:68:10:68:10 | p | |
154
158
| test.cpp:5:3:5:3 | a | |
155
159
| test.cpp:5:7:5:8 | a0 | |
156
160
| test.cpp:6:3:6:3 | b | |
Original file line number Diff line number Diff line change @@ -53,3 +53,17 @@ int afterIf(int n) {
53
53
referenceParameter (i);
54
54
return i;
55
55
}
56
+
57
+ void constPointerReferenceParameter (int * const & pRef);
58
+
59
+ int temporaryObject () {
60
+ int x = 2 ;
61
+ constPointerReferenceParameter (&x);
62
+ return x;
63
+ }
64
+
65
+ int * noTemporaryObject () {
66
+ int *p = nullptr ;
67
+ constPointerReferenceParameter (p);
68
+ return p;
69
+ }
Original file line number Diff line number Diff line change 118
118
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:49:5:49:5 | i |
119
119
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:53:22:53:22 | i |
120
120
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:54:10:54:10 | i |
121
+ | pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:61:35:61:35 | x |
122
+ | pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:62:10:62:10 | x |
123
+ | pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:67:34:67:34 | p |
124
+ | pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:68:10:68:10 | p |
121
125
| test.cpp:3:16:3:17 | a0 | test.cpp:5:7:5:8 | a0 |
122
126
| test.cpp:3:24:3:25 | b0 | test.cpp:6:7:6:8 | b0 |
123
127
| test.cpp:3:32:3:33 | c0 | test.cpp:7:7:7:8 | c0 |
Original file line number Diff line number Diff line change 56
56
| pass_by_ref.cpp:45:17:45:17 | n | pass_by_ref.cpp:48:7:48:7 | n |
57
57
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:49:5:49:5 | i |
58
58
| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:54:10:54:10 | i |
59
+ | pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:62:10:62:10 | x |
60
+ | pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:68:10:68:10 | p |
59
61
| test.cpp:3:16:3:17 | a0 | test.cpp:5:7:5:8 | a0 |
60
62
| test.cpp:3:24:3:25 | b0 | test.cpp:6:7:6:8 | b0 |
61
63
| test.cpp:3:32:3:33 | c0 | test.cpp:7:7:7:8 | c0 |
Original file line number Diff line number Diff line change 25
25
| pass_by_ref.cpp:21:7:21:8 | i2 | pass_by_ref.cpp:24:26:24:27 | i2 | pass_by_ref.cpp:27:39:27:40 | i2 |
26
26
| pass_by_ref.cpp:21:7:21:8 | i2 | pass_by_ref.cpp:25:27:25:28 | i2 | pass_by_ref.cpp:27:39:27:40 | i2 |
27
27
| pass_by_ref.cpp:45:17:45:17 | n | pass_by_ref.cpp:46:11:46:11 | n | pass_by_ref.cpp:48:7:48:7 | n |
28
+ | pass_by_ref.cpp:60:7:60:7 | x | pass_by_ref.cpp:61:35:61:35 | x | pass_by_ref.cpp:62:10:62:10 | x |
29
+ | pass_by_ref.cpp:66:8:66:8 | p | pass_by_ref.cpp:67:34:67:34 | p | pass_by_ref.cpp:68:10:68:10 | p |
28
30
| test.cpp:4:7:4:7 | a | test.cpp:14:7:14:7 | a | test.cpp:18:7:18:7 | a |
29
31
| test.cpp:4:7:4:7 | a | test.cpp:14:7:14:7 | a | test.cpp:24:7:24:7 | a |
30
32
| test.cpp:4:7:4:7 | a | test.cpp:14:7:14:7 | a | test.cpp:28:11:28:11 | a |
You can’t perform that action at this time.
0 commit comments