From 13100b19bc78f8ffc28b07ba50dbfc43070328e4 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:07:20 +0100 Subject: [PATCH] C++: Fix unintentionally changing the type of AdditionalCallTarget.viableTarget. --- .../semmle/code/cpp/ir/dataflow/internal/DataFlowDispatch.qll | 2 +- .../lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowDispatch.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowDispatch.qll index 30a1f0c75aa..4d2e861f0cf 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowDispatch.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowDispatch.qll @@ -40,7 +40,7 @@ DataFlowCallable viableCallable(DataFlowCall call) { result = defaultViableCallable(call) or // Additional call targets - result = + result.getUnderlyingCallable() = any(AdditionalCallTarget additional) .viableTarget(call.asCallInstruction().getUnconvertedResultExpression()) } diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll index 551ef04b997..a15e035c9b8 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll @@ -2681,5 +2681,5 @@ class AdditionalCallTarget extends Unit { /** * Gets a viable target for `call`. */ - abstract DataFlowCallable viableTarget(Call call); + abstract Declaration viableTarget(Call call); }