Skip to content

Commit a038b38

Browse files
committed
C++: More cleanup.
1 parent d41d2bc commit a038b38

File tree

2 files changed

+207
-190
lines changed

2 files changed

+207
-190
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/ProductFlow.qll

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,22 @@ module ProductFlow {
297297
reachable(source1, source2, sink1, sink2)
298298
}
299299

300+
/** Holds if data can flow from `(source1, source2)` to `(sink1, sink2)`. */
301+
predicate flow(
302+
DataFlow::Node source1, DataFlow::Node source2, DataFlow::Node sink1, DataFlow::Node sink2
303+
) {
304+
exists(
305+
Flow1::PathNode pSource1, Flow2::PathNode pSource2, Flow1::PathNode pSink1,
306+
Flow2::PathNode pSink2
307+
|
308+
pSource1.getNode() = source1 and
309+
pSource2.getNode() = source2 and
310+
pSink1.getNode() = sink1 and
311+
pSink2.getNode() = sink2 and
312+
flowPath(pSource1, pSource2, pSink1, pSink2)
313+
)
314+
}
315+
300316
private module Config1 implements DataFlow::StateConfigSig {
301317
class FlowState = FlowState1;
302318

0 commit comments

Comments
 (0)