File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,21 +316,22 @@ module API {
316316 )
317317 or
318318 // Calling a method on a node that is a use of `base`
319- exists ( MethodCall call , DataFlow:: Node node |
319+ exists ( ExprNodes :: MethodCallCfgNode call , DataFlow:: Node node , string name |
320320 pred .flowsTo ( node ) and
321- node .asExpr ( ) .getExpr ( ) = call .getReceiver ( ) and
322- lbl = Label:: return ( call .getMethodName ( ) ) and
323- call .getMethodName ( ) != "new" and
324- ref .asExpr ( ) .getExpr ( ) = call
321+ node .asExpr ( ) = call .getReceiver ( ) and
322+ name = call .getExpr ( ) .getMethodName ( ) and
323+ lbl = Label:: return ( name ) and
324+ name != "new" and
325+ ref .asExpr ( ) = call
325326 )
326327 or
327328 // Calling the `new` method on a node that is a use of `base`, which creates a new instance
328- exists ( MethodCall call , DataFlow:: Node node |
329+ exists ( ExprNodes :: MethodCallCfgNode call , DataFlow:: Node node |
329330 pred .flowsTo ( node ) and
330- node .asExpr ( ) . getExpr ( ) = call .getReceiver ( ) and
331+ node .asExpr ( ) = call .getReceiver ( ) and
331332 lbl = Label:: instance ( ) and
332- call .getMethodName ( ) = "new" and
333- ref .asExpr ( ) . getExpr ( ) = call
333+ call .getExpr ( ) . getMethodName ( ) = "new" and
334+ ref .asExpr ( ) = call
334335 )
335336 )
336337 }
You can’t perform that action at this time.
0 commit comments