Skip to content

Commit 66da997

Browse files
committed
Dataflow: Make use of defaults for language-specific hooks.
1 parent 7e04ac5 commit 66da997

File tree

15 files changed

+6
-135
lines changed

15 files changed

+6
-135
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowDispatch.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,3 @@ class ArgumentPosition extends int {
7979
/** Holds if arguments at position `apos` match parameters at position `ppos`. */
8080
pragma[inline]
8181
predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { ppos = apos }
82-
83-
/**
84-
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
85-
*
86-
* This is a temporary hook to support technical debt in the Go language; do not use.
87-
*/
88-
pragma[inline]
89-
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
90-
any()
91-
}

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,3 @@ class ContentApprox = Unit;
297297
/** Gets an approximated value for content `c`. */
298298
pragma[inline]
299299
ContentApprox getContentApprox(Content c) { any() }
300-
301-
/**
302-
* Gets an additional term that is added to the `join` and `branch` computations to reflect
303-
* an additional forward or backwards branching factor that is not taken into account
304-
* when calculating the (virtual) dispatch cost.
305-
*
306-
* Argument `arg` is part of a path from a source to a sink, and `p` is the target parameter.
307-
*/
308-
int getAdditionalFlowIntoCallNodeTerm(ArgumentNode arg, ParameterNode p) { none() }

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowDispatch.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -271,13 +271,3 @@ DataFlowCallable viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) {
271271
/** Holds if arguments at position `apos` match parameters at position `ppos`. */
272272
pragma[inline]
273273
predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { ppos = apos }
274-
275-
/**
276-
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
277-
*
278-
* This is a temporary hook to support technical debt in the Go language; do not use.
279-
*/
280-
pragma[inline]
281-
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
282-
any()
283-
}

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -528,13 +528,3 @@ predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) {
528528
apos.isImplicitCapturedArgumentPosition(v)
529529
)
530530
}
531-
532-
/**
533-
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
534-
*
535-
* This is a temporary hook to support technical debt in the Go language; do not use.
536-
*/
537-
pragma[inline]
538-
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
539-
any()
540-
}

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,12 +2420,3 @@ module Csv {
24202420
)
24212421
}
24222422
}
2423-
2424-
/**
2425-
* Gets an additional term that is added to the `join` and `branch` computations to reflect
2426-
* an additional forward or backwards branching factor that is not taken into account
2427-
* when calculating the (virtual) dispatch cost.
2428-
*
2429-
* Argument `arg` is part of a path from a source to a sink, and `p` is the target parameter.
2430-
*/
2431-
int getAdditionalFlowIntoCallNodeTerm(ArgumentNode arg, ParameterNode p) { none() }

go/ql/lib/semmle/go/dataflow/internal/DataFlowPrivate.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -423,12 +423,3 @@ class ContentApprox = Unit;
423423
/** Gets an approximated value for content `c`. */
424424
pragma[inline]
425425
ContentApprox getContentApprox(Content c) { any() }
426-
427-
/**
428-
* Gets an additional term that is added to the `join` and `branch` computations to reflect
429-
* an additional forward or backwards branching factor that is not taken into account
430-
* when calculating the (virtual) dispatch cost.
431-
*
432-
* Argument `arg` is part of a path from a source to a sink, and `p` is the target parameter.
433-
*/
434-
int getAdditionalFlowIntoCallNodeTerm(ArgumentNode arg, ParameterNode p) { none() }

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,6 @@ private module DispatchImpl {
171171
/** Holds if arguments at position `apos` match parameters at position `ppos`. */
172172
pragma[inline]
173173
predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { ppos = apos }
174-
175-
/**
176-
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
177-
*
178-
* This is a temporary hook to support technical debt in the Go language; do not use.
179-
*/
180-
pragma[inline]
181-
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
182-
any()
183-
}
184174
}
185175

186176
import DispatchImpl

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -593,12 +593,3 @@ predicate containerContent(Content c) {
593593
c instanceof MapKeyContent or
594594
c instanceof MapValueContent
595595
}
596-
597-
/**
598-
* Gets an additional term that is added to the `join` and `branch` computations to reflect
599-
* an additional forward or backwards branching factor that is not taken into account
600-
* when calculating the (virtual) dispatch cost.
601-
*
602-
* Argument `arg` is part of a path from a source to a sink, and `p` is the target parameter.
603-
*/
604-
int getAdditionalFlowIntoCallNodeTerm(ArgumentNode arg, ParameterNode p) { none() }

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowDispatch.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,13 +1639,3 @@ private module OutNodes {
16391639
* `kind`.
16401640
*/
16411641
OutNode getAnOutNode(DataFlowCall call, ReturnKind kind) { call = result.getCall(kind) }
1642-
1643-
/**
1644-
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
1645-
*
1646-
* This is a temporary hook to support technical debt in the Go language; do not use.
1647-
*/
1648-
pragma[inline]
1649-
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
1650-
any()
1651-
}

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,12 +1002,3 @@ class ContentApprox = Unit;
10021002
/** Gets an approximated value for content `c`. */
10031003
pragma[inline]
10041004
ContentApprox getContentApprox(Content c) { any() }
1005-
1006-
/**
1007-
* Gets an additional term that is added to the `join` and `branch` computations to reflect
1008-
* an additional forward or backwards branching factor that is not taken into account
1009-
* when calculating the (virtual) dispatch cost.
1010-
*
1011-
* Argument `arg` is part of a path from a source to a sink, and `p` is the target parameter.
1012-
*/
1013-
int getAdditionalFlowIntoCallNodeTerm(ArgumentNode arg, ParameterNode p) { none() }

0 commit comments

Comments
 (0)