A call context to restrict the targets of virtual dispatch and prune local flow.
There are four cases:
TAnyCallContext()
: No restrictions on method flow.TSpecificCall(CallSet calls, DispatchSet tgts, UnreachableSetOption unreachable)
: Flow entered through a specific call that improves the set of viable dispatch targets for all ofcalls
to the set of dispatch targets intgts
, and/or the specific call prunes unreachable nodes in the current callable as given byunreachable
.TSomeCall()
: Flow entered through a parameter. The originating call does not improve the set of dispatch targets for any method call in the current callable and was therefore not recorded.TReturn(Callable c, DataFlowCall call)
: Flow reachedcall
fromc
and this dispatch target ofcall
implies a reduced set of dispatch origins to which data may flow if it should reach areturn
statement.
Import path
import codeql.dataflow.internal.DataFlowImplCommon