@@ -32,9 +32,7 @@ class RecursionSource extends MethodCall {
3232 */
3333class ParameterOperation extends Expr {
3434 ParameterOperation ( ) {
35- this instanceof BinaryExpr
36- or
37- this instanceof UnaryAssignExpr and
35+ ( this instanceof BinaryExpr or this instanceof UnaryAssignExpr ) and
3836 exists ( VarAccess va | va .getVariable ( ) = this .getEnclosingCallable ( ) .getAParameter ( ) |
3937 this .getAChildExpr + ( ) = va
4038 )
@@ -44,15 +42,15 @@ class ParameterOperation extends Expr {
4442module RecursiveConfig implements DataFlow:: StateConfigSig {
4543 class FlowState = Method ;
4644
47- predicate isSource ( DataFlow:: Node node , FlowState state ) {
45+ predicate isSource ( DataFlow:: Node node , FlowState firstMethod ) {
4846 node .asExpr ( ) instanceof RecursionSource and
49- state = node .asExpr ( ) .( MethodCall ) .getCaller ( )
47+ firstMethod = node .asExpr ( ) .( MethodCall ) .getCaller ( )
5048 }
5149
52- predicate isSink ( DataFlow:: Node node , FlowState state ) {
50+ predicate isSink ( DataFlow:: Node node , FlowState firstMethod ) {
5351 node .asExpr ( ) instanceof RecursionSource and
54- state .calls + ( node .asExpr ( ) .( MethodCall ) .getCaller ( ) ) and
55- node .asExpr ( ) .( MethodCall ) .getCallee ( ) .calls ( state )
52+ firstMethod .calls + ( node .asExpr ( ) .( MethodCall ) .getCaller ( ) ) and
53+ node .asExpr ( ) .( MethodCall ) .getCallee ( ) .calls ( firstMethod )
5654 }
5755
5856 predicate isBarrier ( DataFlow:: Node node ) {
0 commit comments