You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Gets the parameter position that will receive this argument.
2380
+
*
2381
+
* For all vararg arguments, this is the position of the vararg array parameter.
2382
+
*/
2383
+
intgetParameterPos(){
2384
+
exists(Callablec|c=call.getCallee()|
2385
+
ifc.isVarargs()
2386
+
then
2387
+
ifpos<c.getVaragsParameterIndex()
2388
+
thenresult=pos// Vararg method argument, before the vararg parameter
2389
+
else(
2390
+
ifthis.isVararg()
2391
+
thenresult=c.getVaragsParameterIndex()// Part of the implicit vararg array
2392
+
elseresult=pos-(call.getNumArgument()-c.getNumberOfParameters())// Vararg method argument, after the vararg parameter (offset could be -1 in the zero-vararg case)
0 commit comments