@@ -436,6 +436,16 @@ private module Cached {
436
436
iTo .( InheritanceConversionInstruction ) .getUnary ( ) = iFrom
437
437
}
438
438
439
+ pragma [ noinline]
440
+ private predicate callTargetHasInputOutput (
441
+ CallInstruction call , DataFlow:: FunctionInput input , DataFlow:: FunctionOutput output
442
+ ) {
443
+ exists ( DataFlow:: DataFlowFunction func |
444
+ call .getStaticCallTarget ( ) = func and
445
+ func .hasDataFlow ( input , output )
446
+ )
447
+ }
448
+
439
449
private predicate flowOutOfAddressStep ( Operand operand , Node nTo ) {
440
450
// Flow into a read node
441
451
exists ( ReadNode readNode | readNode = nTo |
@@ -500,13 +510,12 @@ private module Cached {
500
510
or
501
511
// Flow through a modelled function that has parameter -> return value flow.
502
512
exists (
503
- CallInstruction call , DataFlow:: DataFlowFunction func , int index ,
504
- DataFlow:: FunctionInput input , DataFlow :: FunctionOutput output
513
+ CallInstruction call , int index , DataFlow:: FunctionInput input ,
514
+ DataFlow:: FunctionOutput output
505
515
|
506
- call . getStaticCallTarget ( ) = func and
516
+ callTargetHasInputOutput ( call , input , output ) and
507
517
call .getArgumentOperand ( index ) = operand and
508
518
not getSideEffectFor ( call , index ) instanceof ReadSideEffectInstruction and
509
- func .hasDataFlow ( input , output ) and
510
519
input .isParameter ( index ) and
511
520
output .isReturnValue ( ) and
512
521
flowOutOfAddressStep ( call .getAUse ( ) , nTo )
0 commit comments