mirror of
https://github.com/github/codeql.git
synced 2025-12-23 12:16:33 +01:00
C++: Add failing test.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -702,4 +702,21 @@ void call_increment_buf(int** buf) { // $ ast-def=buf
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user