mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
C++: Add testcase with looping behavior in C/C++ use-use flow.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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. |
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user