remove redundant cast

This commit is contained in:
erik-krogh
2025-01-21 09:51:14 +01:00
parent 17afab7d0f
commit 2f1bd75ee9

View File

@@ -58,7 +58,7 @@ class IndexOfCall extends DataFlow::MethodCallNode {
// both use the same concatenation of a string and a value
exists(Expr origin, StringLiteral str, AddExpr otherAdd |
this.getArgument(0).asExpr().(AddExpr).hasOperands(origin, str) and
otherAdd = result.getArgument(0).asExpr().(AddExpr)
otherAdd = result.getArgument(0).asExpr()
|
otherAdd.getAnOperand().(StringLiteral).getStringValue() = str.getStringValue() and
otherAdd.getAnOperand().flow().getALocalSource() = origin.flow().getALocalSource()