Skip to content

Commit aa77ea6

Browse files
authored
Swift: minimal tests for interprocedural flow
1 parent 9f64622 commit aa77ea6

File tree

1 file changed

+16
-0
lines changed
  • swift/ql/test/library-tests/dataflow/dataflow

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,19 @@ func intraprocedural_with_local_flow() -> Void {
2020
}
2121
sink(arg: t1)
2222
}
23+
24+
func caller_source() -> Void {
25+
callee_sink(x: source())
26+
}
27+
28+
func callee_sink(x: Int) -> Void {
29+
sink(arg: x)
30+
}
31+
32+
func callee_source() -> Int {
33+
return source()
34+
}
35+
36+
func caller_sink() -> Void {
37+
sink(arg: callee_source())
38+
}

0 commit comments

Comments
 (0)