diff --git a/powershell/ql/lib/semmle/code/powershell/dataflow/internal/DataFlowPrivate.qll b/powershell/ql/lib/semmle/code/powershell/dataflow/internal/DataFlowPrivate.qll index 20bbe7f6b1f..bd0aa428094 100644 --- a/powershell/ql/lib/semmle/code/powershell/dataflow/internal/DataFlowPrivate.qll +++ b/powershell/ql/lib/semmle/code/powershell/dataflow/internal/DataFlowPrivate.qll @@ -47,15 +47,6 @@ private class ExprNodeImpl extends ExprNode, NodeImpl { override string toStringImpl() { result = this.getExprNode().toString() } } -/** Gets the SSA definition node corresponding to parameter `p`. */ -pragma[nomagic] -SsaImpl::DefinitionExt getParameterDef(Parameter p) { - exists(EntryBasicBlock bb, int i | - bb.getNode(i).getAstNode() = p and - result.definesAt(_, bb, i, _) - ) -} - /** Provides logic related to SSA. */ module SsaFlow { private module Impl = SsaImpl::DataFlowIntegration; @@ -453,7 +444,7 @@ class SsaDefinitionNodeImpl extends SsaNode { exists(SsaImpl::Definition def | def = this.getDefinition() | not def instanceof Ssa::WriteDefinition or - def = getParameterDef(_) + def = SsaImpl::getParameterDef(_) ) } } diff --git a/powershell/ql/lib/semmle/code/powershell/dataflow/internal/SsaImpl.qll b/powershell/ql/lib/semmle/code/powershell/dataflow/internal/SsaImpl.qll index 33741d01863..037f58e8eb7 100644 --- a/powershell/ql/lib/semmle/code/powershell/dataflow/internal/SsaImpl.qll +++ b/powershell/ql/lib/semmle/code/powershell/dataflow/internal/SsaImpl.qll @@ -179,39 +179,12 @@ private module Cached { import Cached -/** - * An extended static single assignment (SSA) definition. - * - * This is either a normal SSA definition (`Definition`) or a - * phi-read node (`PhiReadNode`). - * - * Only intended for internal use. - */ -class DefinitionExt extends Impl::DefinitionExt { - VarReadAccessCfgNode getARead() { result = getARead(this) } - - override string toString() { result = this.(Ssa::Definition).toString() } - - override Location getLocation() { result = this.(Ssa::Definition).getLocation() } -} - -/** - * A phi-read node. - * - * Only intended for internal use. - */ -class PhiReadNode extends DefinitionExt, Impl::PhiReadNode { - override string toString() { result = "SSA phi read(" + this.getSourceVariable() + ")" } - - override Location getLocation() { result = Impl::PhiReadNode.super.getLocation() } -} - /** Gets the SSA definition node corresponding to parameter `p`. */ pragma[nomagic] -DefinitionExt getParameterDef(Parameter p) { +Definition getParameterDef(Parameter p) { exists(Cfg::BasicBlock bb, int i | bb.getNode(i).getAstNode() = p and - result.definesAt(_, bb, i, _) + result.definesAt(_, bb, i) ) }