@@ -293,7 +293,11 @@ private predicate isParameterNodeImpl(Node p, DataFlowCallable c, ParameterPosit
293293 or
294294 pos .isFunctionSelfReference ( ) and p = TFunctionSelfReferenceNode ( c .asSourceCallable ( ) )
295295 or
296- pos .isArgumentsArray ( ) and p = TReflectiveParametersNode ( c .asSourceCallable ( ) )
296+ pos .isArgumentsArray ( ) and p = TReflectiveParametersNode ( c .asSourceCallable ( ) ) // TODO: remove
297+ or
298+ pos .isStaticArgumentArray ( ) and p = TStaticParameterArrayNode ( c .asSourceCallable ( ) )
299+ or
300+ pos .isDynamicArgumentArray ( ) and p = TDynamicParameterArrayNode ( c .asSourceCallable ( ) )
297301 or
298302 exists ( FlowSummaryNode summaryNode |
299303 summaryNode = p and
@@ -347,6 +351,14 @@ private predicate isArgumentNodeImpl(Node n, DataFlowCall call, ArgumentPosition
347351 or
348352 FlowSummaryImpl:: Private:: summaryArgumentNode ( call .( SummaryCall ) .getReceiver ( ) ,
349353 n .( FlowSummaryNode ) .getSummaryNode ( ) , pos )
354+ or
355+ exists ( InvokeExpr invoke | call .asOrdinaryCall ( ) = TValueNode ( invoke ) |
356+ n = TStaticArgumentArrayNode ( invoke ) and
357+ pos .isStaticArgumentArray ( )
358+ or
359+ n = TDynamicArgumentArrayNode ( invoke ) and
360+ pos .isDynamicArgumentArray ( )
361+ )
350362}
351363
352364predicate isArgumentNode ( ArgumentNode n , DataFlowCall call , ArgumentPosition pos ) {
@@ -738,7 +750,9 @@ newtype TParameterPosition =
738750 MkPositionalLowerBound ( int n ) { n = [ 0 .. getMaxArity ( ) ] } or
739751 MkThisParameter ( ) or
740752 MkFunctionSelfReferenceParameter ( ) or
741- MkArgumentsArrayParameter ( )
753+ MkArgumentsArrayParameter ( ) or // TODO: remove
754+ MkStaticArgumentArray ( ) or
755+ MkDynamicArgumentArray ( )
742756
743757class ParameterPosition extends TParameterPosition {
744758 predicate isPositionalExact ( ) { this instanceof MkPositionalParameter }
@@ -755,7 +769,11 @@ class ParameterPosition extends TParameterPosition {
755769
756770 predicate isFunctionSelfReference ( ) { this = MkFunctionSelfReferenceParameter ( ) }
757771
758- predicate isArgumentsArray ( ) { this = MkArgumentsArrayParameter ( ) }
772+ predicate isArgumentsArray ( ) { this = MkArgumentsArrayParameter ( ) } // TODO: remove
773+
774+ predicate isStaticArgumentArray ( ) { this = MkStaticArgumentArray ( ) }
775+
776+ predicate isDynamicArgumentArray ( ) { this = MkDynamicArgumentArray ( ) }
759777
760778 string toString ( ) {
761779 result = this .asPositional ( ) .toString ( )
@@ -766,7 +784,11 @@ class ParameterPosition extends TParameterPosition {
766784 or
767785 this .isFunctionSelfReference ( ) and result = "function"
768786 or
769- this .isArgumentsArray ( ) and result = "arguments-array"
787+ this = MkArgumentsArrayParameter ( ) and result = "deprecated-arguments-array"
788+ or
789+ this .isStaticArgumentArray ( ) and result = "static-argument-array"
790+ or
791+ this .isDynamicArgumentArray ( ) and result = "dynamic-argument-array"
770792 }
771793}
772794
0 commit comments