mirror of
https://github.com/github/codeql.git
synced 2026-05-25 00:27:09 +02:00
PS: Delete more stuff that's being deprecated and replace with non-deprecated versions.
This commit is contained in:
@@ -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(_)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user