11private import cpp
22private import semmle.code.cpp.ir.IR
3- private import DataFlowPrivate
3+ private import DataFlowPrivate as DataFlowPrivate
44private import DataFlowUtil
55private import DataFlowImplCommon as DataFlowImplCommon
66
@@ -256,14 +256,16 @@ private module VirtualDispatch {
256256 * Holds if the set of viable implementations that can be called by `call`
257257 * might be improved by knowing the call context.
258258 */
259- predicate mayBenefitFromCallContext ( DataFlowCall call ) { mayBenefitFromCallContext ( call , _, _) }
259+ predicate mayBenefitFromCallContext ( DataFlowPrivate:: DataFlowCall call ) {
260+ mayBenefitFromCallContext ( call , _, _)
261+ }
260262
261263/**
262264 * Holds if `call` is a call through a function pointer, and the pointer
263265 * value is given as the `arg`'th argument to `f`.
264266 */
265267private predicate mayBenefitFromCallContext (
266- VirtualDispatch :: DataSensitiveCall call , DataFlowCallable f , int arg
268+ DataFlowPrivate :: DataFlowCall call , DataFlowPrivate :: DataFlowCallable f , int arg
267269) {
268270 f = pragma [ only_bind_out ] ( call ) .getEnclosingCallable ( ) and
269271 exists ( InitializeParameterInstruction init |
@@ -278,9 +280,11 @@ private predicate mayBenefitFromCallContext(
278280 * Gets a viable dispatch target of `call` in the context `ctx`. This is
279281 * restricted to those `call`s for which a context might make a difference.
280282 */
281- DataFlowCallable viableImplInCallContext ( DataFlowCall call , DataFlowCall ctx ) {
283+ DataFlowPrivate:: DataFlowCallable viableImplInCallContext (
284+ DataFlowPrivate:: DataFlowCall call , DataFlowPrivate:: DataFlowCall ctx
285+ ) {
282286 result = viableCallable ( call ) and
283- exists ( int i , DataFlowCallable f |
287+ exists ( int i , DataFlowPrivate :: DataFlowCallable f |
284288 mayBenefitFromCallContext ( pragma [ only_bind_into ] ( call ) , f , i ) and
285289 f = ctx .getStaticCallTarget ( ) and
286290 result .asSourceCallable ( ) =
@@ -290,4 +294,8 @@ DataFlowCallable viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) {
290294
291295/** Holds if arguments at position `apos` match parameters at position `ppos`. */
292296pragma [ inline]
293- predicate parameterMatch ( ParameterPosition ppos , ArgumentPosition apos ) { ppos = apos }
297+ predicate parameterMatch (
298+ DataFlowPrivate:: ParameterPosition ppos , DataFlowPrivate:: ArgumentPosition apos
299+ ) {
300+ ppos = apos
301+ }
0 commit comments