File tree Expand file tree Collapse file tree
go/ql/lib/semmle/go/dataflow/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,16 +15,21 @@ private module FlowSummaries {
1515 private import semmle.go.dataflow.FlowSummary as F
1616}
1717
18+ bindingset [ pos]
19+ private string positionToString ( int pos ) {
20+ if pos = - 1 then result = "receiver" else result = pos .toString ( )
21+ }
22+
1823module Input implements InputSig< Location , DataFlowImplSpecific:: GoDataFlow > {
1924 class SummarizedCallableBase = Callable ;
2025
2126 ArgumentPosition callbackSelfParameterPosition ( ) { result = - 1 }
2227
2328 ReturnKind getStandardReturnValueKind ( ) { result = getReturnKind ( 0 ) }
2429
25- string encodeParameterPosition ( ParameterPosition pos ) { result = pos . toString ( ) }
30+ string encodeParameterPosition ( ParameterPosition pos ) { result = positionToString ( pos ) }
2631
27- string encodeArgumentPosition ( ArgumentPosition pos ) { result = pos . toString ( ) }
32+ string encodeArgumentPosition ( ArgumentPosition pos ) { result = positionToString ( pos ) }
2833
2934 string encodeReturn ( ReturnKind rk , string arg ) {
3035 exists ( int pos |
You can’t perform that action at this time.
0 commit comments