File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
go/ql/lib/semmle/go/dataflow/internal Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,21 @@ private module FlowSummaries {
15
15
private import semmle.go.dataflow.FlowSummary as F
16
16
}
17
17
18
+ bindingset [ pos]
19
+ private string positionToString ( int pos ) {
20
+ if pos = - 1 then result = "receiver" else result = pos .toString ( )
21
+ }
22
+
18
23
module Input implements InputSig< Location , DataFlowImplSpecific:: GoDataFlow > {
19
24
class SummarizedCallableBase = Callable ;
20
25
21
26
ArgumentPosition callbackSelfParameterPosition ( ) { result = - 1 }
22
27
23
28
ReturnKind getStandardReturnValueKind ( ) { result = getReturnKind ( 0 ) }
24
29
25
- string encodeParameterPosition ( ParameterPosition pos ) { result = pos . toString ( ) }
30
+ string encodeParameterPosition ( ParameterPosition pos ) { result = positionToString ( pos ) }
26
31
27
- string encodeArgumentPosition ( ArgumentPosition pos ) { result = pos . toString ( ) }
32
+ string encodeArgumentPosition ( ArgumentPosition pos ) { result = positionToString ( pos ) }
28
33
29
34
string encodeReturn ( ReturnKind rk , string arg ) {
30
35
exists ( int pos |
You can’t perform that action at this time.
0 commit comments