Dataflow: Make use of defaults for language-specific hooks.

This commit is contained in:
Anders Schack-Mulligen
2023-09-22 14:54:22 +02:00
parent 7e04ac55b7
commit 66da997b7b
15 changed files with 6 additions and 135 deletions

View File

@@ -171,16 +171,6 @@ private module DispatchImpl {
/** Holds if arguments at position `apos` match parameters at position `ppos`. */
pragma[inline]
predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { ppos = apos }
/**
* Holds if flow from `call`'s argument `arg` to parameter `p` is permissible.
*
* This is a temporary hook to support technical debt in the Go language; do not use.
*/
pragma[inline]
predicate golangSpecificParamArgFilter(DataFlowCall call, ParameterNode p, ArgumentNode arg) {
any()
}
}
import DispatchImpl

View File

@@ -593,12 +593,3 @@ predicate containerContent(Content c) {
c instanceof MapKeyContent or
c instanceof MapValueContent
}
/**
* Gets an additional term that is added to the `join` and `branch` computations to reflect
* an additional forward or backwards branching factor that is not taken into account
* when calculating the (virtual) dispatch cost.
*
* Argument `arg` is part of a path from a source to a sink, and `p` is the target parameter.
*/
int getAdditionalFlowIntoCallNodeTerm(ArgumentNode arg, ParameterNode p) { none() }