mirror of
https://github.com/github/codeql.git
synced 2026-03-22 15:36:48 +01:00
Switch to using VariableAssign for instanceof and switch dataflow
This commit is contained in:
@@ -167,20 +167,6 @@ private module TypeTrackingSteps {
|
||||
def.(BaseSsaUpdate).getDefiningExpr().(VariableAssign).getSource() = n1.asExpr()
|
||||
or
|
||||
def.(BaseSsaImplicitInit).isParameterDefinition(n1.asParameter())
|
||||
or
|
||||
exists(PatternCase pc |
|
||||
pc.getPattern().asBindingPattern() = def.(BaseSsaUpdate).getDefiningExpr() and
|
||||
(
|
||||
pc.getSwitch().getExpr() = n1.asExpr()
|
||||
or
|
||||
pc.getSwitchExpr().getExpr() = n1.asExpr()
|
||||
)
|
||||
)
|
||||
or
|
||||
exists(InstanceOfExpr ioe |
|
||||
ioe.getPattern().asBindingPattern() = def.(BaseSsaUpdate).getDefiningExpr() and
|
||||
ioe.getExpr() = n1.asExpr()
|
||||
)
|
||||
|
|
||||
v.getAnUltimateDefinition() = def and
|
||||
v.getAUse() = n2.asExpr()
|
||||
|
||||
@@ -80,20 +80,6 @@ private predicate step(Node n1, Node n2) {
|
||||
for.getVariable() = def.(BaseSsaUpdate).getDefiningExpr() and
|
||||
for.getExpr() = n1.asExpr()
|
||||
)
|
||||
or
|
||||
exists(PatternCase pc |
|
||||
pc.getPattern().asBindingPattern() = def.(BaseSsaUpdate).getDefiningExpr() and
|
||||
(
|
||||
pc.getSwitch().getExpr() = n1.asExpr()
|
||||
or
|
||||
pc.getSwitchExpr().getExpr() = n1.asExpr()
|
||||
)
|
||||
)
|
||||
or
|
||||
exists(InstanceOfExpr ioe |
|
||||
ioe.getPattern().asBindingPattern() = def.(BaseSsaUpdate).getDefiningExpr() and
|
||||
ioe.getExpr() = n1.asExpr()
|
||||
)
|
||||
|
|
||||
v.getAnUltimateDefinition() = def and
|
||||
v.getAUse() = n2.asExpr()
|
||||
|
||||
Reference in New Issue
Block a user