Remove redundant code

The case of a CallExpr is actually covered by the next disjunct.

Note that the CallExpr case had a subtle bug: `c.getTarget()` is not
defined when we are calling a variable. Better to use
`c.getCalleeType()`. But in this case we can just delete the code.
This commit is contained in:
Owen Mansel-Chan
2025-05-13 15:55:20 +01:00
parent 7da1ade835
commit 933e01b3d4

View File

@@ -718,10 +718,6 @@ module IR {
predicate extractsElement(Instruction base, int idx) { base = this.getBase() and idx = i }
override Type getResultType() {
exists(CallExpr c | this.getBase() = evalExprInstruction(c) |
result = c.getTarget().getResultType(i)
)
or
exists(Expr e | this.getBase() = evalExprInstruction(e) |
result = e.getType().(TupleType).getComponentType(pragma[only_bind_into](i))
)