C++: Add failing test.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-06-09 15:33:49 +01:00
parent b3a19ef7b2
commit 5816f177c9
2 changed files with 18 additions and 0 deletions

View File

@@ -128,6 +128,7 @@ postWithInFlow
| test.cpp:690:3:690:3 | s [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:694:4:694:6 | buf [inner post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:704:23:704:25 | buf [inner post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:715:25:715:25 | c [inner post update] | PostUpdateNode should not be the target of local flow. |
viableImplInCallContextTooLarge
uniqueParameterNodeAtPosition
uniqueParameterNodePosition

View File

@@ -703,3 +703,20 @@ void test_conflation_regression(int* source) { // $ ast-def=source
int* buf = source;
call_increment_buf(&buf);
}
void write_to_star_star_p(unsigned char **p) // $ ast-def=p ir-def=**p ir-def=*p
{
**p = 0;
}
void write_to_star_buf(unsigned char *buf) // $ ast-def=buf
{
unsigned char *c = buf;
write_to_star_star_p(&c);
}
void test(unsigned char *source) // $ ast-def=source
{
write_to_star_buf(source);
sink(*source); // $ SPURIOUS: ir
}