File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
cpp/ql/test/library-tests/dataflow/dataflow-tests Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ postWithInFlow
4141| example.c:26:9:26:9 | x [post update] | PostUpdateNode should not be the target of local flow. |
4242| example.c:26:19:26:24 | coords [inner post update] | PostUpdateNode should not be the target of local flow. |
4343| example.c:28:23:28:25 | pos [inner post update] | PostUpdateNode should not be the target of local flow. |
44+ | flowOut.cpp:5:5:5:12 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
45+ | flowOut.cpp:5:6:5:12 | toTaint [inner post update] | PostUpdateNode should not be the target of local flow. |
46+ | flowOut.cpp:18:17:18:17 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
4447| globals.cpp:13:5:13:19 | flowTestGlobal1 [post update] | PostUpdateNode should not be the target of local flow. |
4548| globals.cpp:23:5:23:19 | flowTestGlobal2 [post update] | PostUpdateNode should not be the target of local flow. |
4649| lambdas.cpp:23:3:23:14 | v [post update] | PostUpdateNode should not be the target of local flow. |
Original file line number Diff line number Diff line change 1+ int source ();
2+ void sink (int );
3+
4+ void source_ref (int *toTaint) { // $ ir-def=*toTaint ast-def=toTaint
5+ *toTaint = source ();
6+ }
7+
8+
9+
10+ void modify_copy (int * ptr) { // $ ast-def=ptr
11+ int deref = *ptr;
12+ int * other = &deref;
13+ source_ref (other);
14+ }
15+
16+ void test_output () {
17+ int x = 0 ;
18+ modify_copy (&x);
19+ sink (x); // $ SPURIOUS: ir
20+ }
You can’t perform that action at this time.
0 commit comments