Skip to content

Commit 0338ffd

Browse files
authored
Merge pull request #16444 from owen-mc/shared/update-summary-through-step-value
Shared data flow: Make summaryThroughStepValue include param outputs
2 parents 8b91914 + aab43af commit 0338ffd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

shared/dataflow/codeql/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,10 +1286,8 @@ module Make<
12861286
* be useful to include in the exposed local data-flow/taint-tracking relations.
12871287
*/
12881288
predicate summaryThroughStepValue(ArgNode arg, Node out, SummarizedCallable sc) {
1289-
exists(ReturnKind rk, SummaryNode ret, DataFlowCall call |
1290-
summaryLocalStep(summaryArgParam(call, arg, sc), ret, true, _) and
1291-
summaryReturnNode(ret, pragma[only_bind_into](rk)) and
1292-
out = getAnOutNode(call, pragma[only_bind_into](rk))
1289+
exists(SummaryNode ret |
1290+
summaryLocalStep(summaryArgParamRetOut(arg, ret, out, sc), ret, true, _)
12931291
)
12941292
}
12951293

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,10 @@
794794
| test.swift:680:10:680:11 | &... | test.swift:681:15:681:15 | x |
795795
| test.swift:680:11:680:11 | [post] x | test.swift:680:10:680:11 | &... |
796796
| test.swift:680:11:680:11 | x | test.swift:680:10:680:11 | &... |
797+
| test.swift:680:11:680:11 | x | test.swift:680:15:680:15 | [post] y |
797798
| test.swift:680:14:680:15 | &... | test.swift:682:15:682:15 | y |
798799
| test.swift:680:15:680:15 | [post] y | test.swift:680:14:680:15 | &... |
800+
| test.swift:680:15:680:15 | y | test.swift:680:11:680:11 | [post] x |
799801
| test.swift:680:15:680:15 | y | test.swift:680:14:680:15 | &... |
800802
| test.swift:686:9:686:9 | SSA def(arr1) | test.swift:687:15:687:15 | arr1 |
801803
| test.swift:686:9:686:9 | arr1 | test.swift:686:9:686:9 | SSA def(arr1) |

0 commit comments

Comments
 (0)