diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll index 0c57c2cea3bc..b4d66a31d6be 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowDispatch.qll @@ -415,6 +415,9 @@ class CilDataFlowCall extends DataFlowCall, TCilCall { CilDataFlowCall() { this = TCilCall(call) } + /** Gets the underlying CIL call. */ + CIL::Call getCilCall() { result = call } + override DataFlowCallable getARuntimeTarget() { // There is no dispatch library for CIL, so do not consider overrides for now result.getUnderlyingCallable() = getCallableForDataFlow(call.getTarget()) diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll index f4b5abf69c6e..e2ee1a0f13be 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll @@ -1181,7 +1181,7 @@ private module ArgumentNodes { ExplicitArgumentNode() { this.asExpr() instanceof Argument or - this.asExpr() = any(CIL::Call call).getAnArgument() + this.asExpr() = any(CilDataFlowCall cc).getCilCall().getAnArgument() } override predicate argumentOf(DataFlowCall call, ArgumentPosition pos) {