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 7777| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:46:11:46:11 | n |
7878| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:49:5:49:7 | ... ++ |
7979| 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 |
8082| test.cpp:4:7:4:7 | a | test.cpp:5:3:5:8 | ... = ... |
8183| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... |
8284| test.cpp:4:7:4:7 | a | test.cpp:19:5:19:9 | ... = ... |
Original file line number Diff line number Diff line change 7575| 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 |
7676| 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 |
7777| 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 |
7882| test.cpp:4:7:4:7 | a | test.cpp:5:3:5:8 | ... = ... | test.cpp:9:7:9:7 | a |
7983| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... | test.cpp:14:7:14:7 | a |
8084| 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 1717| 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 | {...} |
1818| 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 | {...} |
1919| 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 |
2022| test.cpp:4:7:4:7 | a | test.cpp:5:3:5:8 | ... = ... | test.cpp:5:7:5:8 | a0 |
2123| test.cpp:4:7:4:7 | a | test.cpp:13:3:13:7 | ... = ... | test.cpp:13:7:13:7 | b |
2224| 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 151151| pass_by_ref.cpp:49:5:49:5 | i | |
152152| pass_by_ref.cpp:53:22:53:22 | i | non-const address |
153153| 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 | |
154158| test.cpp:5:3:5:3 | a | |
155159| test.cpp:5:7:5:8 | a0 | |
156160| 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) {
5353 referenceParameter (i);
5454 return i;
5555}
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 118118| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:49:5:49:5 | i |
119119| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:53:22:53:22 | i |
120120| 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 |
121125| test.cpp:3:16:3:17 | a0 | test.cpp:5:7:5:8 | a0 |
122126| test.cpp:3:24:3:25 | b0 | test.cpp:6:7:6:8 | b0 |
123127| test.cpp:3:32:3:33 | c0 | test.cpp:7:7:7:8 | c0 |
Original file line number Diff line number Diff line change 5656| pass_by_ref.cpp:45:17:45:17 | n | pass_by_ref.cpp:48:7:48:7 | n |
5757| pass_by_ref.cpp:46:7:46:7 | i | pass_by_ref.cpp:49:5:49:5 | i |
5858| 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 |
5961| test.cpp:3:16:3:17 | a0 | test.cpp:5:7:5:8 | a0 |
6062| test.cpp:3:24:3:25 | b0 | test.cpp:6:7:6:8 | b0 |
6163| test.cpp:3:32:3:33 | c0 | test.cpp:7:7:7:8 | c0 |
Original file line number Diff line number Diff line change 2525| 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 |
2626| 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 |
2727| 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 |
2830| test.cpp:4:7:4:7 | a | test.cpp:14:7:14:7 | a | test.cpp:18:7:18:7 | a |
2931| test.cpp:4:7:4:7 | a | test.cpp:14:7:14:7 | a | test.cpp:24:7:24:7 | a |
3032| 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