C++: Add testcase with looping behavior in C/C++ use-use flow.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-01-23 14:29:39 +00:00
parent 55550e7980
commit a217017859
4 changed files with 20 additions and 0 deletions

View File

@@ -92,6 +92,9 @@ postWithInFlow
| test.cpp:499:3:499:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:499:4:499:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:505:35:505:35 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:511:5:511:6 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:511:6:511:6 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:516:23:516:23 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
viableImplInCallContextTooLarge
uniqueParameterNodeAtPosition
uniqueParameterNodePosition

View File

@@ -591,6 +591,12 @@ postWithInFlow
| test.cpp:505:34:505:35 | & ... [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:505:34:505:35 | & ... [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:505:35:505:35 | x [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:511:5:511:6 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:511:6:511:6 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:511:6:511:6 | p [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:516:22:516:23 | & ... [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:516:22:516:23 | & ... [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:516:23:516:23 | x [post update] | PostUpdateNode should not be the target of local flow. |
| true_upon_entry.cpp:9:7:9:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
| true_upon_entry.cpp:10:12:10:12 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
| true_upon_entry.cpp:10:27:10:27 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |

View File

@@ -505,3 +505,13 @@ void viaOutparamMissingReturn() {
intOutparamSourceMissingReturn(&x);
sink(x); // $ ast,ir
}
void sink_then_source(int* p) {
sink(*p);
*p = source(); // clean
}
void test_sink_then_source() {
int x;
sink_then_source(&x);
}

View File

@@ -34,3 +34,4 @@
| test.cpp:441:7:441:11 | local | test.cpp:442:18:442:22 | local |
| test.cpp:441:7:441:11 | local | test.cpp:443:8:443:12 | local |
| test.cpp:441:7:441:11 | local | test.cpp:444:9:444:13 | local |
| test.cpp:515:9:515:9 | x | test.cpp:516:23:516:23 | x |