From 60ee92d8346b2efc91e513cd16103ca34f258eab Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 21 Jan 2026 20:28:28 +0000 Subject: [PATCH] C++: Drive-by fix: Don't use the uncached ''getAPhiInputOrPriorDefinition' predicate. Instead, cache it and call it like we are supposed to. --- .../lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll index 28541a3837b..fb24a1db69f 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaImpl.qll @@ -940,6 +940,11 @@ module SsaCached { SsaImpl::phiHasInputFromBlock(phi, inp, bb) } + cached + predicate uncertainWriteDefinitionInput(Definition uncertain, Definition inp) { + SsaImpl::uncertainWriteDefinitionInput(uncertain, inp) + } + cached predicate ssaDefReachesEndOfBlock(IRBlock bb, Definition def) { SsaImpl::ssaDefReachesEndOfBlock(bb, def, _) @@ -1178,7 +1183,7 @@ class Definition extends SsaImpl::Definition { private Definition getAPhiInputOrPriorDefinition() { result = this.(PhiNode).getAnInput() or - SsaImpl::uncertainWriteDefinitionInput(this, result) + uncertainWriteDefinitionInput(this, result) } /**