mirror of
https://github.com/github/codeql.git
synced 2026-04-24 08:15:14 +02:00
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:
@@ -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))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user