File tree Expand file tree Collapse file tree 4 files changed +21
-0
lines changed
cpp/ql/test/library-tests/dataflow/dataflow-tests Expand file tree Collapse file tree 4 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,9 @@ postWithInFlow
159
159
| test.cpp:808:5:808:21 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
160
160
| test.cpp:808:6:808:21 | global_indirect1 [inner post update] | PostUpdateNode should not be the target of local flow. |
161
161
| test.cpp:832:5:832:17 | global_direct [post update] | PostUpdateNode should not be the target of local flow. |
162
+ | test.cpp:931:5:931:18 | global_pointer [post update] | PostUpdateNode should not be the target of local flow. |
163
+ | test.cpp:932:5:932:19 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
164
+ | test.cpp:932:6:932:19 | global_pointer [inner post update] | PostUpdateNode should not be the target of local flow. |
162
165
viableImplInCallContextTooLarge
163
166
uniqueParameterNodeAtPosition
164
167
uniqueParameterNodePosition
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ uniqueType
4
4
uniqueNodeLocation
5
5
missingLocation
6
6
uniqueNodeToString
7
+ | test.cpp:930:8:930:10 | Use of **global_pointer | Node should have one toString but has 2. |
8
+ | test.cpp:930:8:930:10 | Use of *global_pointer | Node should have one toString but has 2. |
7
9
parameterCallable
8
10
localFlowIsLocal
9
11
readStepIsLocal
Original file line number Diff line number Diff line change @@ -300,6 +300,8 @@ irFlow
300
300
| test.cpp:902:56:902:75 | *indirect_source(2) | test.cpp:911:19:911:48 | *global_array_static_indirect_2 |
301
301
| test.cpp:914:46:914:53 | source | test.cpp:919:10:919:30 | global_pointer_static |
302
302
| test.cpp:915:57:915:76 | *indirect_source(1) | test.cpp:921:19:921:50 | *global_pointer_static_indirect_1 |
303
+ | test.cpp:932:23:932:28 | call to source | test.cpp:936:10:936:23 | global_pointer |
304
+ | test.cpp:932:23:932:28 | call to source | test.cpp:937:10:937:24 | * ... |
303
305
| true_upon_entry.cpp:9:11:9:16 | call to source | true_upon_entry.cpp:13:8:13:8 | x |
304
306
| true_upon_entry.cpp:17:11:17:16 | call to source | true_upon_entry.cpp:21:8:21:8 | x |
305
307
| 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 @@ -922,4 +922,18 @@ namespace GlobalArrays {
922
922
sink (global_pointer_static_indirect_2); // clean: global_pointer_static_indirect_2 does not have 2 indirections
923
923
indirect_sink (global_pointer_static_indirect_2); // clean: global_pointer_static_indirect_2 does not have 2 indirections
924
924
}
925
+ }
926
+
927
+ namespace global_variable_conflation_test {
928
+ int * global_pointer;
929
+
930
+ void def () {
931
+ global_pointer = nullptr ;
932
+ *global_pointer = source ();
933
+ }
934
+
935
+ void use () {
936
+ sink (global_pointer); // $ SPURIOUS: ir
937
+ sink (*global_pointer); // $ ir MISSING: ast
938
+ }
925
939
}
You can’t perform that action at this time.
0 commit comments