Python: Swaps out element_from_tuple

This commit is contained in:
Rebecca Valentine
2020-03-09 16:20:22 -07:00
parent 2bcd8c8cb8
commit f4f8c6e1e5

View File

@@ -274,9 +274,9 @@ class ExceptFlowNode extends ControlFlowNode {
(
this.getType().pointsTo(val, origin)
or
exists(Value tup |
this.handledObject(val, ClassValue::tuple(), _) |
element_from_tuple(tup).pointsTo(val, origin)
exists(TupleValue tup |
this.handledObject(tup, ClassValue::tuple(), _) |
val = tup.getItem(_) and origin.pointsTo(val)
)
)
}
@@ -317,12 +317,6 @@ private ControlFlowNode element_from_tuple_objectapi(Object tuple) {
)
}
private ControlFlowNode element_from_tuple(Value tuple) {
exists(Expr x, Tuple t |
x.pointsTo(tuple,t) and result = t.getAnElt().getAFlowNode()
)
}
/** A Reraising node is the node at the end of a finally block (on the exceptional branch)
* that reraises the current exception.
*/