C++: Add test with missing flow.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-10-23 13:00:33 +01:00
parent 197642c914
commit 2fd07f28f0

View File

@@ -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