mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
C++: Add test with missing flow.
This commit is contained in:
@@ -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