diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/SsaImpl.qll b/python/ql/lib/semmle/python/dataflow/new/internal/SsaImpl.qll index d406d30f148..d9609599a58 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/SsaImpl.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/SsaImpl.qll @@ -48,14 +48,6 @@ private module CfgForSsa implements BB::CfgSig { predicate dominatingEdge = CfgImpl::Cfg::dominatingEdge/2; } -/** - * A source variable for SSA. Wraps a Python `Variable` (the AST-level - * notion of a named binding within a scope) so that the shared SSA - * implementation can use it as a `SourceVariable`. - * - * We only track variables that are read at least once in their scope — - * tracking write-only variables is unnecessary work. - */ /** * A source variable for SSA, wrapping a Python AST `Variable`. * @@ -113,7 +105,9 @@ class SsaSourceVariable extends TSsaSourceVariable { * `SsaSourceVariable.getASourceUse()`. */ Cfg::ControlFlowNode getASourceUse() { - exists(Cfg::NameNode n | result = n | n.uses(this.getVariable()) or n.deletes(this.getVariable())) + exists(Cfg::NameNode n | result = n | + n.uses(this.getVariable()) or n.deletes(this.getVariable()) + ) } /** @@ -223,6 +217,31 @@ private module SsaImplInput implements SsaImplCommon::InputSig