mirror of
https://github.com/github/codeql.git
synced 2026-04-21 15:05:56 +02:00
C++: Add failing tests.
This commit is contained in:
@@ -23,6 +23,7 @@ argHasPostUpdate
|
||||
| lambdas.cpp:38:2:38:2 | d | ArgumentNode is missing PostUpdateNode. |
|
||||
| lambdas.cpp:45:2:45:2 | e | ArgumentNode is missing PostUpdateNode. |
|
||||
| test.cpp:67:29:67:35 | source1 | ArgumentNode is missing PostUpdateNode. |
|
||||
| test.cpp:813:19:813:35 | * ... | ArgumentNode is missing PostUpdateNode. |
|
||||
postWithInFlow
|
||||
| BarrierGuard.cpp:49:6:49:6 | x [post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| BarrierGuard.cpp:60:7:60:7 | x [post update] | PostUpdateNode should not be the target of local flow. |
|
||||
@@ -136,6 +137,9 @@ postWithInFlow
|
||||
| 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. |
|
||||
| test.cpp:808:5:808:21 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| test.cpp:808:6:808:21 | global_indirect1 [inner post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| test.cpp:832:5:832:17 | global_direct [post update] | PostUpdateNode should not be the target of local flow. |
|
||||
viableImplInCallContextTooLarge
|
||||
uniqueParameterNodeAtPosition
|
||||
uniqueParameterNodePosition
|
||||
|
||||
@@ -796,4 +796,44 @@ void test() {
|
||||
MyStruct a;
|
||||
intPointerSource(a.content, a.content);
|
||||
indirect_sink(a.content); // $ ast ir
|
||||
}
|
||||
|
||||
namespace MoreGlobalTests {
|
||||
int **global_indirect1;
|
||||
int **global_indirect2;
|
||||
int **global_direct;
|
||||
|
||||
void set_indirect1()
|
||||
{
|
||||
*global_indirect1 = indirect_source();
|
||||
}
|
||||
|
||||
void read_indirect1() {
|
||||
sink(global_indirect1); // clean
|
||||
indirect_sink(*global_indirect1); // $ MISSING: ir,ast
|
||||
}
|
||||
|
||||
void set_indirect2()
|
||||
{
|
||||
**global_indirect2 = source();
|
||||
}
|
||||
|
||||
void read_indirect2() {
|
||||
sink(global_indirect2); // clean
|
||||
sink(**global_indirect2); // $ MISSING: ir,ast
|
||||
}
|
||||
|
||||
// overload source with a boolean parameter so
|
||||
// that we can define a variant that return an int**.
|
||||
int** source(bool);
|
||||
|
||||
void set_direct()
|
||||
{
|
||||
global_direct = source(true);
|
||||
}
|
||||
|
||||
void read_direct() {
|
||||
sink(global_direct); // $ ir MISSING: ast
|
||||
indirect_sink(global_direct); // clean
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user