@@ -196,11 +196,16 @@ string getComponentSpecific(SummaryComponent sc) {
196196 exists ( Content c | sc = TContentSummaryComponent ( c ) and result = getContentSpecific ( c ) )
197197}
198198
199+ bindingset [ pos]
200+ private string positionToString ( int pos ) {
201+ if pos = - 1 then result = "this" else result = pos .toString ( )
202+ }
203+
199204/** Gets the textual representation of a parameter position in the format used for flow summaries. */
200- string getParameterPosition ( ParameterPosition pos ) { result = pos . toString ( ) }
205+ string getParameterPosition ( ParameterPosition pos ) { result = positionToString ( pos ) }
201206
202207/** Gets the textual representation of an argument position in the format used for flow summaries. */
203- string getArgumentPosition ( ArgumentPosition pos ) { result = pos . toString ( ) }
208+ string getArgumentPosition ( ArgumentPosition pos ) { result = positionToString ( pos ) }
204209
205210/** Holds if input specification component `c` needs a reference. */
206211predicate inputNeedsReferenceSpecific ( string c ) { none ( ) }
@@ -314,8 +319,16 @@ predicate interpretInputSpecific(string c, InterpretNode mid, InterpretNode n) {
314319
315320/** Gets the argument position obtained by parsing `X` in `Parameter[X]`. */
316321bindingset [ s]
317- ArgumentPosition parseParamBody ( string s ) { result = AccessPath:: parseInt ( s ) }
322+ ArgumentPosition parseParamBody ( string s ) {
323+ result = AccessPath:: parseInt ( s )
324+ or
325+ s = "this" and result = - 1
326+ }
318327
319328/** Gets the parameter position obtained by parsing `X` in `Argument[X]`. */
320329bindingset [ s]
321- ParameterPosition parseArgBody ( string s ) { result = AccessPath:: parseInt ( s ) }
330+ ParameterPosition parseArgBody ( string s ) {
331+ result = AccessPath:: parseInt ( s )
332+ or
333+ s = "this" and result = - 1
334+ }
0 commit comments