@@ -62,6 +62,16 @@ private predicate summarizedLocalStep(Node nodeFrom, Node nodeTo) {
62
62
.flowsTo ( returnNode ) and
63
63
callStep ( nodeTo .asExpr ( ) , nodeFrom , param )
64
64
)
65
+ or
66
+ exists (
67
+ SummarizedCallable callable , DataFlowPublic:: CallNode call , SummaryComponent input ,
68
+ SummaryComponent output
69
+ |
70
+ hasLevelSummary ( callable , input , output ) and
71
+ call .asExpr ( ) .getExpr ( ) = callable .getACallSimple ( ) and
72
+ nodeFrom = evaluateSummaryComponentLocal ( call , input ) and
73
+ nodeTo = evaluateSummaryComponentLocal ( call , output )
74
+ )
65
75
}
66
76
67
77
/** Holds if there is a level step from `nodeFrom` to `nodeTo`. */
@@ -230,6 +240,12 @@ class Boolean extends boolean {
230
240
231
241
private import SummaryComponentStack
232
242
243
+ private predicate hasLevelSummary (
244
+ SummarizedCallable callable , SummaryComponent input , SummaryComponent output
245
+ ) {
246
+ callable .propagatesFlow ( singleton ( input ) , singleton ( output ) , true )
247
+ }
248
+
233
249
private predicate hasStoreSummary (
234
250
SummarizedCallable callable , DataFlow:: ContentSet contents , SummaryComponent input ,
235
251
SummaryComponent output
0 commit comments