Skip to content

Commit c4915b2

Browse files
committed
Dataflow: Add additional annotation.
1 parent 6c781b5 commit c4915b2

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -838,13 +838,13 @@ private module Stage1 implements StageSig {
838838
* by `revFlow`.
839839
*/
840840
pragma[nomagic]
841-
predicate revFlowIsReadAndStored(Content c, Configuration conf) {
841+
additional predicate revFlowIsReadAndStored(Content c, Configuration conf) {
842842
revFlowConsCand(c, conf) and
843843
revFlowStore(c, _, _, conf)
844844
}
845845

846846
pragma[nomagic]
847-
predicate viableReturnPosOutNodeCandFwd1(
847+
additional predicate viableReturnPosOutNodeCandFwd1(
848848
DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config
849849
) {
850850
fwdFlowReturnPosition(pos, _, config) and
@@ -860,7 +860,7 @@ private module Stage1 implements StageSig {
860860
}
861861

862862
pragma[nomagic]
863-
predicate viableParamArgNodeCandFwd1(
863+
additional predicate viableParamArgNodeCandFwd1(
864864
DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config
865865
) {
866866
viableParamArgEx(call, p, arg) and
@@ -907,7 +907,7 @@ private module Stage1 implements StageSig {
907907
)
908908
}
909909

910-
predicate revFlowState(FlowState state, Configuration config) {
910+
additional predicate revFlowState(FlowState state, Configuration config) {
911911
exists(NodeEx node |
912912
sinkNode(node, state, config) and
913913
revFlow(node, _, pragma[only_bind_into](config)) and
@@ -999,7 +999,7 @@ private module Stage1 implements StageSig {
999999
)
10001000
}
10011001

1002-
predicate stats(
1002+
additional predicate stats(
10031003
boolean fwd, int nodes, int fields, int conscand, int states, int tuples, Configuration config
10041004
) {
10051005
fwd = true and
@@ -1260,7 +1260,7 @@ private module MkStage<StageSig PrevStage> {
12601260
* argument.
12611261
*/
12621262
pragma[nomagic]
1263-
predicate fwdFlow(
1263+
additional predicate fwdFlow(
12641264
NodeEx node, FlowState state, Cc cc, ApOption argAp, Ap ap, Configuration config
12651265
) {
12661266
fwdFlow0(node, state, cc, argAp, ap, config) and
@@ -1484,7 +1484,7 @@ private module MkStage<StageSig PrevStage> {
14841484
* the access path of the returned value.
14851485
*/
14861486
pragma[nomagic]
1487-
predicate revFlow(
1487+
additional predicate revFlow(
14881488
NodeEx node, FlowState state, boolean toReturn, ApOption returnAp, Ap ap, Configuration config
14891489
) {
14901490
revFlow0(node, state, toReturn, returnAp, ap, config) and
@@ -1662,7 +1662,7 @@ private module MkStage<StageSig PrevStage> {
16621662
)
16631663
}
16641664

1665-
predicate revFlow(NodeEx node, FlowState state, Configuration config) {
1665+
additional predicate revFlow(NodeEx node, FlowState state, Configuration config) {
16661666
revFlow(node, state, _, _, _, config)
16671667
}
16681668

@@ -1675,11 +1675,13 @@ private module MkStage<StageSig PrevStage> {
16751675

16761676
// use an alias as a workaround for bad functionality-induced joins
16771677
pragma[nomagic]
1678-
predicate revFlowAlias(NodeEx node, Configuration config) { revFlow(node, _, _, _, _, config) }
1678+
additional predicate revFlowAlias(NodeEx node, Configuration config) {
1679+
revFlow(node, _, _, _, _, config)
1680+
}
16791681

16801682
// use an alias as a workaround for bad functionality-induced joins
16811683
pragma[nomagic]
1682-
predicate revFlowAlias(NodeEx node, FlowState state, Ap ap, Configuration config) {
1684+
additional predicate revFlowAlias(NodeEx node, FlowState state, Ap ap, Configuration config) {
16831685
revFlow(node, state, ap, config)
16841686
}
16851687

@@ -1700,7 +1702,7 @@ private module MkStage<StageSig PrevStage> {
17001702
)
17011703
}
17021704

1703-
predicate consCand(TypedContent tc, Ap ap, Configuration config) {
1705+
additional predicate consCand(TypedContent tc, Ap ap, Configuration config) {
17041706
revConsCand(tc, ap, config) and
17051707
validAp(ap, config)
17061708
}
@@ -1742,7 +1744,7 @@ private module MkStage<StageSig PrevStage> {
17421744
)
17431745
}
17441746

1745-
predicate stats(
1747+
additional predicate stats(
17461748
boolean fwd, int nodes, int fields, int conscand, int states, int tuples, Configuration config
17471749
) {
17481750
fwd = true and

0 commit comments

Comments
 (0)