Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d64c0a

Browse files
committed
C++: Add failing test.
1 parent 1e4caca commit 9d64c0a

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ postWithInFlow
108108
| test.cpp:562:5:562:13 | globalInt [post update] | PostUpdateNode should not be the target of local flow. |
109109
| test.cpp:576:5:576:13 | globalInt [post update] | PostUpdateNode should not be the target of local flow. |
110110
| test.cpp:589:19:589:19 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
111+
| test.cpp:596:3:596:4 | xs [inner post update] | PostUpdateNode should not be the target of local flow. |
112+
| test.cpp:596:3:596:7 | access to array [post update] | PostUpdateNode should not be the target of local flow. |
111113
viableImplInCallContextTooLarge
112114
uniqueParameterNodeAtPosition
113115
uniqueParameterNodePosition

cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,4 +588,11 @@ void test_write_to_param() {
588588
int x = 0;
589589
write_to_param(&x);
590590
sink(x); // $ SPURIOUS: ast
591-
}
591+
}
592+
593+
void test_indirect_flow_to_array() {
594+
int* p = indirect_source();
595+
int* xs[2];
596+
xs[0] = p;
597+
sink(*xs[0]); // $ MISSING: ir,ast
598+
}

cpp/ql/test/library-tests/dataflow/dataflow-tests/uninitialized.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@
4040
| test.cpp:547:9:547:9 | x | test.cpp:548:25:548:25 | x |
4141
| test.cpp:551:9:551:9 | y | test.cpp:552:25:552:25 | y |
4242
| test.cpp:551:9:551:9 | y | test.cpp:552:28:552:28 | y |
43+
| test.cpp:595:8:595:9 | xs | test.cpp:596:3:596:4 | xs |
44+
| test.cpp:595:8:595:9 | xs | test.cpp:597:9:597:10 | xs |

0 commit comments

Comments
 (0)