From a35ed5784811d265e0edf477536b3dbb7cb003f9 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Tue, 28 Jan 2025 17:09:45 +0000 Subject: [PATCH] Revert "C++: Don't generate parameter nodes for bodyless parameters when there is a summary of the enclosing function." This reverts commit ad80b36074bb41ece2b7fba1435449fc7ed97c41. --- .../semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll | 2 +- .../lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll index f71696f03d23..b373a0a32604 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll @@ -1009,7 +1009,7 @@ class CastNode extends Node { } cached -newtype TDataFlowCallable = +private newtype TDataFlowCallable = TSourceCallable(Cpp::Declaration decl) or TSummarizedCallable(FlowSummaryImpl::Public::SummarizedCallable c) 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 6f929445aaa2..df239cc6cc4a 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 @@ -66,7 +66,6 @@ private newtype TIRDataFlowNode = TFinalGlobalValue(Ssa::GlobalUse globalUse) or TInitialGlobalValue(Ssa::GlobalDef globalUse) or TBodyLessParameterNodeImpl(Parameter p, int indirectionIndex) { - not exists(TSummarizedCallable(p.getFunction())) and // Rule out parameters of catch blocks. not exists(p.getCatchBlock()) and // We subtract one because `getMaxIndirectionsForType` returns the maximum