Skip to content

Commit b12b808

Browse files
committed
Overlay.qll: remove unnecessary clauses
1 parent 01871a8 commit b12b808

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

python/ql/lib/semmle/python/Overlay.qll

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -109,41 +109,23 @@ final private class DiscardableContainer extends Discardable instanceof @contain
109109
overlay[local]
110110
final private class DiscardableCfgNode extends Discardable instanceof @py_flow_node {
111111
override string getPath() {
112-
exists(Discardable d | result = d.getPath() |
113-
py_flow_bb_node(this, d.(@py_ast_node), _, _)
114-
or
115-
py_scope_flow(this, d.(@py_scope), _)
116-
)
112+
exists(Discardable d | result = d.getPath() | py_flow_bb_node(this, d.(@py_ast_node), _, _))
117113
}
118114
}
119115

120116
/** Discardable Python variables. */
121117
overlay[local]
122118
final private class DiscardableVar extends Discardable instanceof @py_variable {
123119
override string getPath() {
124-
exists(Discardable parent | result = parent.getPath() |
125-
variable(this, parent.(@py_scope), _)
126-
or
127-
py_variables(this, parent.(@py_variable_parent))
128-
)
120+
exists(Discardable parent | result = parent.getPath() | variable(this, parent.(@py_scope), _))
129121
}
130122
}
131123

132124
/** Discardable SSA variables. */
133125
overlay[local]
134126
final private class DiscardableSsaVar extends Discardable instanceof @py_ssa_var {
135127
override string getPath() {
136-
exists(DiscardableSsaVar other | result = other.getPath() |
137-
py_ssa_phi(this, other.(@py_ssa_var))
138-
)
139-
or
140128
exists(DiscardableVar other | result = other.getPath() | py_ssa_var(this, other))
141-
or
142-
exists(DiscardableCfgNode node | result = node.getPath() |
143-
py_ssa_use(node, this)
144-
or
145-
py_ssa_defn(this, node)
146-
)
147129
}
148130
}
149131

0 commit comments

Comments
 (0)