mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
ensure an indexOf call is equivalent with itself. (getAUse() is used later to find matching indexOf calls)
This commit is contained in:
@@ -44,6 +44,8 @@ class IndexOfCall extends DataFlow::MethodCallNode {
|
||||
* Gets an `indexOf` call with the same receiver, argument, and method name, including this call itself.
|
||||
*/
|
||||
IndexOfCall getAnEquivalentIndexOfCall() {
|
||||
result = this
|
||||
or
|
||||
exists(DataFlow::Node recv, string m |
|
||||
this.receiverAndMethodName(recv, m) and result.receiverAndMethodName(recv, m)
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user