C++: Add failing test.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-02-26 22:56:18 +00:00
parent b952f619db
commit 575ac46bf3
2 changed files with 16 additions and 0 deletions

View File

@@ -110,6 +110,10 @@ postWithInFlow
| test.cpp:589:19:589:19 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:596:3:596:4 | xs [inner post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:596:3:596:7 | access to array [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:602:3:602:3 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:602:3:602:7 | access to array [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:608:3:608:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:608:4:608:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
viableImplInCallContextTooLarge
uniqueParameterNodeAtPosition
uniqueParameterNodePosition

View File

@@ -596,3 +596,15 @@ void test_indirect_flow_to_array() {
xs[0] = p;
sink(*xs[0]); // $ ir=594:12 MISSING: ast SPURIOUS: ir=595:8
}
void test_def_by_ref_followed_by_uncertain_write_array(int* p) { // $ ast-def=p ir-def=*p
intPointerSource(p);
p[10] = 0;
sink(*p); // $ MISSING: ast,ir
}
void test_def_by_ref_followed_by_uncertain_write_pointer(int* p) { // $ ast-def=p ir-def=*p
intPointerSource(p);
*p = 0;
sink(*p); // $ MISSING: ast,ir
}