Skip to content

Commit f358297

Browse files
committed
Shared: Pass SummaryComponentStack to isSource and getSourceType
1 parent 6ac0b9e commit f358297

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,12 +1206,12 @@ module Make<
12061206
* Holds if this node is an exit node, i.e. after all stores have been performed.
12071207
*
12081208
* A local flow step should be added from this node to a data flow node representing
1209-
* `sc` inside `source`.
1209+
* `s` inside `source`.
12101210
*/
1211-
predicate isExit(SourceElement source, SummaryComponent sc, string model) {
1211+
predicate isExit(SourceElement source, SummaryComponentStack s, string model) {
12121212
source = source_ and
12131213
model = model_ and
1214-
state_.isSourceOutputState(source, TSingletonSummaryComponentStack(sc), _, model)
1214+
state_.isSourceOutputState(source, s, _, model)
12151215
}
12161216

12171217
override predicate isHidden() { not this.isEntry(_, _) }
@@ -1460,7 +1460,7 @@ module Make<
14601460

14611461
DataFlowType getSyntheticGlobalType(SyntheticGlobal sg);
14621462

1463-
DataFlowType getSourceType(SourceBase source, SummaryComponent sc);
1463+
DataFlowType getSourceType(SourceBase source, SummaryComponentStack sc);
14641464

14651465
DataFlowType getSinkType(SinkBase sink, SummaryComponent sc);
14661466
}
@@ -1543,9 +1543,9 @@ module Make<
15431543
)
15441544
or
15451545
exists(SourceElement source |
1546-
exists(SummaryComponent sc |
1547-
n.(SourceOutputNode).isExit(source, sc, _) and
1548-
result = getSourceType(source, sc)
1546+
exists(SummaryComponentStack s |
1547+
n.(SourceOutputNode).isExit(source, s, _) and
1548+
result = getSourceType(source, s)
15491549
)
15501550
or
15511551
exists(SummaryComponentStack s, ContentSet cont |
@@ -1577,10 +1577,10 @@ module Make<
15771577
/**
15781578
* Gets a data flow node corresponding to the `sc` part of `source`.
15791579
*
1580-
* `sc` is typically `ReturnValue` and the result is the node that
1580+
* `s` is typically `ReturnValue` and the result is the node that
15811581
* represents the return value of `source`.
15821582
*/
1583-
Node getSourceNode(SourceBase source, SummaryComponent sc);
1583+
Node getSourceNode(SourceBase source, SummaryComponentStack s);
15841584

15851585
/**
15861586
* Gets a data flow node corresponding to the `sc` part of `sink`.
@@ -1623,7 +1623,7 @@ module Make<
16231623
}
16241624

16251625
predicate sourceLocalStep(SourceOutputNode nodeFrom, Node nodeTo, string model) {
1626-
exists(SummaryComponent sc, SourceElement source |
1626+
exists(SummaryComponentStack sc, SourceElement source |
16271627
nodeFrom.isExit(source, sc, model) and
16281628
nodeTo = StepsInput::getSourceNode(source, sc)
16291629
)

0 commit comments

Comments
 (0)