Merge pull request #15260 from hvitved/dataflow/may-benefit-from-cctx-simplify

Data flow: Remove column from `mayBenefitFromCallContext`
This commit is contained in:
Tom Hvitved
2024-01-10 11:43:15 +01:00
committed by GitHub
17 changed files with 85 additions and 126 deletions

View File

@@ -116,10 +116,10 @@ private module DispatchImpl {
/**
* Holds if the set of viable implementations that can be called by `call`
* might be improved by knowing the call context. This is the case if the
* qualifier is a parameter of the enclosing callable `c`.
* qualifier is a parameter of the enclosing callable of `call`.
*/
predicate mayBenefitFromCallContext(DataFlowCall call, DataFlowCallable c) {
mayBenefitFromCallContext(call.asCall(), c.asCallable(), _)
predicate mayBenefitFromCallContext(DataFlowCall call) {
mayBenefitFromCallContext(call.asCall(), _, _)
}
/**

View File

@@ -18,4 +18,8 @@ module JavaDataFlow implements InputSig {
import Public
Node exprNode(DataFlowExpr e) { result = Public::exprNode(e) }
predicate mayBenefitFromCallContext = Private::mayBenefitFromCallContext/1;
predicate viableImplInCallContext = Private::viableImplInCallContext/2;
}