diff --git a/cpp/ql/lib/semmle/code/cpp/controlflow/SSAUtils.qll b/cpp/ql/lib/semmle/code/cpp/controlflow/SSAUtils.qll index 6912110bb0c..36b32e24e0a 100644 --- a/cpp/ql/lib/semmle/code/cpp/controlflow/SSAUtils.qll +++ b/cpp/ql/lib/semmle/code/cpp/controlflow/SSAUtils.qll @@ -153,9 +153,11 @@ library class SSAHelper extends int { * Modern Compiler Implementation by Andrew Appel. */ private predicate frontier_phi_node(StackVariable v, BasicBlock b) { - exists(BasicBlock x | dominanceFrontier(pragma[only_bind_into](x), b) and ssa_defn_rec(v, x)) and + exists(BasicBlock x | + dominanceFrontier(x, pragma[only_bind_into](b)) and ssa_defn_rec(pragma[only_bind_into](v), x) + ) and /* We can also eliminate those nodes where the variable is not live on any incoming edge */ - live_at_start_of_bb(v, b) + live_at_start_of_bb(pragma[only_bind_into](v), b) } private predicate ssa_defn_rec(StackVariable v, BasicBlock b) {