mirror of
https://github.com/github/codeql.git
synced 2025-12-23 04:06:37 +01:00
C++: Add another testcase with conflation.
This commit is contained in:
@@ -129,6 +129,9 @@ postWithInFlow
|
||||
| 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. |
|
||||
| test.cpp:728:3:728:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| test.cpp:728:4:728:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| test.cpp:734:41:734:41 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
|
||||
viableImplInCallContextTooLarge
|
||||
uniqueParameterNodeAtPosition
|
||||
uniqueParameterNodePosition
|
||||
|
||||
@@ -715,8 +715,22 @@ void write_to_star_buf(unsigned char *buf) // $ ast-def=buf
|
||||
write_to_star_star_p(&c);
|
||||
}
|
||||
|
||||
void test(unsigned char *source) // $ ast-def=source
|
||||
void test_write_to_star_buf(unsigned char *source) // $ ast-def=source
|
||||
{
|
||||
write_to_star_buf(source);
|
||||
sink(*source); // clean
|
||||
}
|
||||
}
|
||||
|
||||
void does_not_write_source_to_dereference(int *p) // $ ast-def=p ir-def=*p
|
||||
{
|
||||
int x = source();
|
||||
p = &x;
|
||||
*p = 42;
|
||||
}
|
||||
|
||||
void test_does_not_write_source_to_dereference()
|
||||
{
|
||||
int x;
|
||||
does_not_write_source_to_dereference(&x);
|
||||
sink(x); // $ ast,ir=733:7 SPURIOUS: ast,ir=726:11
|
||||
}
|
||||
|
||||
@@ -42,3 +42,5 @@
|
||||
| test.cpp:551:9:551:9 | y | test.cpp:552:28:552:28 | y |
|
||||
| test.cpp:595:8:595:9 | xs | test.cpp:596:3:596:4 | xs |
|
||||
| test.cpp:595:8:595:9 | xs | test.cpp:597:9:597:10 | xs |
|
||||
| test.cpp:733:7:733:7 | x | test.cpp:734:41:734:41 | x |
|
||||
| test.cpp:733:7:733:7 | x | test.cpp:735:8:735:8 | x |
|
||||
|
||||
Reference in New Issue
Block a user