Dataflow: Fix reference to viableCallable.

This commit is contained in:
Anders Schack-Mulligen
2020-06-29 16:22:58 +02:00
parent 6c679c328d
commit 0bd81eb4b8
4 changed files with 8 additions and 8 deletions

View File

@@ -344,7 +344,7 @@ private module Cached {
mayBenefitFromCallContext(call, c) and
c = viableCallable(ctx) and
ctxtgts = count(viableImplInCallContext(call, ctx)) and
tgts = strictcount(viableImpl(call)) and
tgts = strictcount(viableCallable(call)) and
ctxtgts < tgts
)
}
@@ -369,7 +369,7 @@ private module Cached {
predicate reducedViableImplInReturn(DataFlowCallable c, DataFlowCall call) {
exists(int tgts, int ctxtgts |
mayBenefitFromCallContext(call, _) and
c = viableImpl(call) and
c = viableCallable(call) and
ctxtgts = count(DataFlowCall ctx | c = viableImplInCallContext(call, ctx)) and
tgts = strictcount(DataFlowCall ctx | viableCallable(ctx) = call.getEnclosingCallable()) and
ctxtgts < tgts