remove redundant cast where the type is enforced by an equality comparison

This commit is contained in:
Erik Krogh Kristensen
2021-10-28 18:08:20 +02:00
parent e75448ebb0
commit 15c90adec5
19 changed files with 26 additions and 30 deletions

View File

@@ -31,7 +31,7 @@ class Expr extends StmtParent, @expr {
override Stmt getEnclosingStmt() {
result = this.getParent().(Expr).getEnclosingStmt()
or
result = this.getParent().(Stmt)
result = this.getParent()
or
exists(Expr other | result = other.getEnclosingStmt() and other.getConversion() = this)
or