Skip to content

Commit d539a41

Browse files
committed
unified: Add test with flow through Argument[self]
1 parent 90321a8 commit d539a41

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎unified/ql/test/library-tests/dataflow/flow-summaries.swift‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,9 @@ func t10() {
7070
sink(x) // $ hasValueFlow=t10.2 SPURIOUS: hasValueFlow=t10.1
7171
sink(y) // $ hasValueFlow=t10.1 SPURIOUS: hasValueFlow=t10.2
7272
}
73+
74+
func t11() {
75+
let t = TestType()
76+
t.setField(source("t11.1"))
77+
sink(t.getField()) // $ MISSING: hasValueFlow=t11.1
78+
}

‎unified/ql/test/library-tests/dataflow/test.ext.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ extensions:
1616
- ["", "TestType", true, "taintFlow(_:)", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
1717
- ["", "TestType", true, "swap(_:_:)", "", "", "Argument[0]", "Argument[1]", "value", "manual"]
1818
- ["", "TestType", true, "swap(_:_:)", "", "", "Argument[1]", "Argument[0]", "value", "manual"]
19+
- ["", "TestType", true, "getField()", "", "", "Argument[self].Member[field]", "ReturnValue", "value", "manual"]
20+
- ["", "TestType", true, "setField(_:)", "", "", "Argument[0]", "Argument[self].Member[field]", "value", "manual"]

0 commit comments

Comments
 (0)