mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #17826 from MathiasVP/missing-flow-with-aliasing-fields
C++: Add test with missing flow
This commit is contained in:
@@ -185,6 +185,8 @@ postWithInFlow
|
||||
| simple.cpp:83:12:83:13 | f1 [post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| simple.cpp:92:7:92:7 | i [post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| simple.cpp:118:7:118:7 | i [post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| simple.cpp:124:5:124:6 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| simple.cpp:124:6:124:6 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| struct_init.c:24:11:24:12 | ab [inner post update] | PostUpdateNode should not be the target of local flow. |
|
||||
| struct_init.c:36:17:36:24 | nestedAB [inner post update] | PostUpdateNode should not be the target of local flow. |
|
||||
viableImplInCallContextTooLarge
|
||||
|
||||
@@ -291,3 +291,6 @@ WARNING: module 'DataFlow' has been deprecated and may be removed in future (par
|
||||
| simple.cpp:94:10:94:11 | a2 | IR only |
|
||||
| simple.cpp:118:7:118:7 | i | AST only |
|
||||
| simple.cpp:120:8:120:8 | a | IR only |
|
||||
| simple.cpp:124:5:124:6 | * ... | AST only |
|
||||
| simple.cpp:131:14:131:14 | a | IR only |
|
||||
| simple.cpp:136:10:136:10 | a | IR only |
|
||||
|
||||
@@ -651,6 +651,9 @@
|
||||
| simple.cpp:94:10:94:11 | a2 |
|
||||
| simple.cpp:118:5:118:5 | a |
|
||||
| simple.cpp:120:8:120:8 | a |
|
||||
| simple.cpp:131:14:131:14 | a |
|
||||
| simple.cpp:135:20:135:20 | q |
|
||||
| simple.cpp:136:10:136:10 | a |
|
||||
| struct_init.c:15:8:15:9 | ab |
|
||||
| struct_init.c:15:12:15:12 | a |
|
||||
| struct_init.c:16:8:16:9 | ab |
|
||||
|
||||
@@ -581,6 +581,8 @@ WARNING: module 'DataFlow' has been deprecated and may be removed in future (par
|
||||
| simple.cpp:92:7:92:7 | i |
|
||||
| simple.cpp:118:5:118:5 | a |
|
||||
| simple.cpp:118:7:118:7 | i |
|
||||
| simple.cpp:124:5:124:6 | * ... |
|
||||
| simple.cpp:135:20:135:20 | q |
|
||||
| struct_init.c:15:8:15:9 | ab |
|
||||
| struct_init.c:15:12:15:12 | a |
|
||||
| struct_init.c:16:8:16:9 | ab |
|
||||
|
||||
@@ -120,4 +120,20 @@ void post_update_to_phi_input(bool b)
|
||||
sink(a.i); // $ ast,ir
|
||||
}
|
||||
|
||||
} // namespace Simple
|
||||
void write_to_param(int* p) {
|
||||
*p = user_input();
|
||||
}
|
||||
|
||||
void alias_with_fields(bool b) {
|
||||
A a;
|
||||
int* q;
|
||||
if(b) {
|
||||
q = &a.i;
|
||||
} else {
|
||||
q = nullptr;
|
||||
}
|
||||
write_to_param(q);
|
||||
sink(a.i); // $ MISSING: ast,ir
|
||||
}
|
||||
|
||||
} // namespace Simple
|
||||
Reference in New Issue
Block a user