Skip to content

Commit 3b585b4

Browse files
committed
C++: Add test with missing flow.
1 parent 4a448f4 commit 3b585b4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

cpp/ql/test/library-tests/dataflow/dataflow-tests/TestBase.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ module IRTest {
151151
or
152152
call.getTarget().getName() = "indirect_sink" and
153153
sink.asIndirectExpr() = e
154+
or
155+
call.getTarget().getName() = "indirect_sink_const_ref" and
156+
sink.asIndirectExpr() = e
154157
)
155158
}
156159

cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,3 +1073,10 @@ void single_object_in_both_cases(bool b, int x, int y) {
10731073
*p = 0;
10741074
sink(*p); // clean
10751075
}
1076+
1077+
template<typename T>
1078+
void indirect_sink_const_ref(const T&);
1079+
1080+
void test_temp_with_conversion_from_materialization() {
1081+
indirect_sink_const_ref(source()); // $ MISSING: ast,ir
1082+
}

0 commit comments

Comments
 (0)