C++: Add test with missing flow.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-06-21 13:19:49 +01:00
parent 4a448f445e
commit 3b585b4196
2 changed files with 10 additions and 0 deletions

View File

@@ -151,6 +151,9 @@ module IRTest {
or
call.getTarget().getName() = "indirect_sink" and
sink.asIndirectExpr() = e
or
call.getTarget().getName() = "indirect_sink_const_ref" and
sink.asIndirectExpr() = e
)
}

View File

@@ -1073,3 +1073,10 @@ void single_object_in_both_cases(bool b, int x, int y) {
*p = 0;
sink(*p); // clean
}
template<typename T>
void indirect_sink_const_ref(const T&);
void test_temp_with_conversion_from_materialization() {
indirect_sink_const_ref(source()); // $ MISSING: ast,ir
}