33 */
44
55private import go
6+ private import DataFlowDispatch
67private import DataFlowPrivate
78private import DataFlowUtil
89private import FlowSummaryImpl:: Private
@@ -18,40 +19,6 @@ class SummarizedCallableBase = Callable;
1819
1920DataFlowCallable inject ( SummarizedCallable c ) { result .asCallable ( ) = c }
2021
21- /** Holds if `i` is a valid parameter position. */
22- predicate parameterPosition ( int i ) {
23- i = [ - 1 .. any ( DataFlowCallable c ) .getType ( ) .getNumParameter ( ) ]
24- }
25-
26- /** Gets the parameter position of the instance parameter. */
27- int instanceParameterPosition ( ) { result = - 1 }
28-
29- /** A parameter position represented by an integer. */
30- class ParameterPosition extends int {
31- ParameterPosition ( ) { parameterPosition ( this ) }
32- }
33-
34- /** An argument position represented by an integer. */
35- class ArgumentPosition extends int {
36- ArgumentPosition ( ) { parameterPosition ( this ) }
37- }
38-
39- /** Holds if arguments at position `apos` match parameters at position `ppos`. */
40- pragma [ inline]
41- predicate parameterMatch ( ParameterPosition ppos , ArgumentPosition apos ) { ppos = apos }
42-
43- /**
44- * Holds if `arg` is an argument of `call` with an argument position that matches
45- * parameter position `ppos`.
46- */
47- pragma [ noinline]
48- predicate argumentPositionMatch ( DataFlowCall call , ArgNode arg , ParameterPosition ppos ) {
49- exists ( ArgumentPosition apos |
50- arg .argumentOf ( call , apos ) and
51- parameterMatch ( ppos , apos )
52- )
53- }
54-
5522/** Gets the textual representation of a parameter position in the format used for flow summaries. */
5623string getParameterPositionCsv ( ParameterPosition pos ) { result = pos .toString ( ) }
5724
0 commit comments