Skip to content

Commit 43b8d9e

Browse files
committed
swift
1 parent ea18732 commit 43b8d9e

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,7 @@ private module Cached {
305305
model = ""
306306
or
307307
// flow through a flow summary (extension of `SummaryModelCsv`)
308-
FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom,
309-
nodeTo.(FlowSummaryNode).getSummaryNode(), true, model)
308+
FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom, nodeTo, true, model)
310309
}
311310

312311
/**
@@ -1014,8 +1013,7 @@ predicate captureValueStep(Node node1, Node node2) {
10141013

10151014
predicate jumpStep(Node pred, Node succ) {
10161015
// models-as-data summarized flow
1017-
FlowSummaryImpl::Private::Steps::summaryJumpStep(pred.(FlowSummaryNode).getSummaryNode(),
1018-
succ.(FlowSummaryNode).getSummaryNode())
1016+
FlowSummaryImpl::Private::Steps::summaryJumpStep(pred, succ)
10191017
}
10201018

10211019
predicate storeStep(Node node1, ContentSet c, Node node2) {

swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,20 @@ private module Input2 implements Impl::Private::InputSig2 {
129129
DataFlowCallable getEnclosingCallable() { none() }
130130
}
131131

132-
bindingset[source, s]
133132
SourceSinkReportingElement getSourceEntryElement(
134-
Impl::Public::SourceElement source, Impl::Private::SummaryComponentStack s
133+
Impl::Public::SourceElement source, Impl::Private::SummaryComponent sc
135134
) {
136135
none()
137136
}
138137

139-
bindingset[e, s]
140-
Node getSourceExitNode(SourceSinkReportingElement e, Impl::Private::SummaryComponentStack s) {
138+
SourceSinkReportingElement getNextElement(
139+
SourceSinkReportingElement prev, Impl::Private::SummaryComponent sc
140+
) {
141+
none()
142+
}
143+
144+
bindingset[e, sc]
145+
Node getSourceExitNode(SourceSinkReportingElement e, Impl::Private::SummaryComponent sc) {
141146
none()
142147
}
143148

swift/ql/lib/codeql/swift/dataflow/internal/TaintTrackingPrivate.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ private module Cached {
7676
model = ""
7777
or
7878
// flow through a flow summary (extension of `SummaryModelCsv`)
79-
FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom,
80-
nodeTo.(FlowSummaryNode).getSummaryNode(), false, model)
79+
FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom, nodeTo, false, model)
8180
or
8281
any(AdditionalTaintStep a).step(nodeFrom, nodeTo) and model = "AdditionalTaintStep"
8382
}

0 commit comments

Comments
 (0)