Java: Improve performance of confusing overloading query.

This commit is contained in:
alexet
2021-09-22 15:17:06 +01:00
parent 49f8f46354
commit dea8dde566

View File

@@ -50,6 +50,7 @@ private predicate whitelist(string name) { name = "visit" }
* Method `m` has name `name`, number of parameters `numParams`
* and is declared in `t` or inherited from a supertype of `t`.
*/
pragma[nomagic]
private predicate candidateMethod(RefType t, Method m, string name, int numParam) {
exists(Method n | n.getSourceDeclaration() = m | t.inherits(n)) and
m.getName() = name and