File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
cpp/ql/test/library-tests/dataflow/dataflow-tests Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ argHasPostUpdate
24
24
| lambdas.cpp:45:2:45:2 | e | ArgumentNode is missing PostUpdateNode. |
25
25
| test.cpp:67:29:67:35 | source1 | ArgumentNode is missing PostUpdateNode. |
26
26
| test.cpp:813:19:813:35 | * ... | ArgumentNode is missing PostUpdateNode. |
27
+ | test.cpp:848:23:848:25 | rpx | ArgumentNode is missing PostUpdateNode. |
27
28
postWithInFlow
28
29
| BarrierGuard.cpp:49:6:49:6 | x [post update] | PostUpdateNode should not be the target of local flow. |
29
30
| BarrierGuard.cpp:60:7:60:7 | x [post update] | PostUpdateNode should not be the target of local flow. |
Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ astFlow
118
118
| test.cpp:788:31:788:36 | call to source | test.cpp:782:12:782:12 | x |
119
119
| test.cpp:790:31:790:36 | call to source | test.cpp:782:12:782:12 | x |
120
120
| test.cpp:797:22:797:28 | ref arg content | test.cpp:798:19:798:25 | content |
121
+ | test.cpp:842:11:842:16 | call to source | test.cpp:844:8:844:8 | y |
122
+ | test.cpp:846:13:846:27 | call to indirect_source | test.cpp:848:23:848:25 | rpx |
121
123
| true_upon_entry.cpp:17:11:17:16 | call to source | true_upon_entry.cpp:21:8:21:8 | x |
122
124
| true_upon_entry.cpp:27:9:27:14 | call to source | true_upon_entry.cpp:29:8:29:8 | x |
123
125
| true_upon_entry.cpp:33:11:33:16 | call to source | true_upon_entry.cpp:39:8:39:8 | x |
@@ -278,6 +280,9 @@ irFlow
278
280
| test.cpp:808:25:808:39 | call to indirect_source indirection | test.cpp:813:19:813:35 | * ... indirection |
279
281
| test.cpp:818:26:818:31 | call to source | test.cpp:823:10:823:27 | * ... |
280
282
| test.cpp:832:21:832:26 | call to source | test.cpp:836:10:836:22 | global_direct |
283
+ | test.cpp:842:11:842:16 | call to source | test.cpp:844:8:844:8 | y |
284
+ | test.cpp:846:13:846:27 | call to indirect_source indirection | test.cpp:848:17:848:25 | rpx indirection |
285
+ | test.cpp:846:13:846:27 | call to indirect_source indirection | test.cpp:848:23:848:25 | (reference dereference) indirection |
281
286
| true_upon_entry.cpp:9:11:9:16 | call to source | true_upon_entry.cpp:13:8:13:8 | x |
282
287
| true_upon_entry.cpp:17:11:17:16 | call to source | true_upon_entry.cpp:21:8:21:8 | x |
283
288
| true_upon_entry.cpp:27:9:27:14 | call to source | true_upon_entry.cpp:29:8:29:8 | x |
Original file line number Diff line number Diff line change @@ -836,4 +836,14 @@ namespace MoreGlobalTests {
836
836
sink (global_direct); // $ ir MISSING: ast
837
837
indirect_sink (global_direct); // clean
838
838
}
839
+ }
840
+
841
+ void test_references () {
842
+ int x = source ();
843
+ int &y = x;
844
+ sink (y); // $ ast,ir
845
+
846
+ int * px = indirect_source ();
847
+ int *& rpx = px;
848
+ indirect_sink ((int *)rpx); // $ ast,ir
839
849
}
You can’t perform that action at this time.
0 commit comments