Revert "Ruby: Fix performance of Filter.getAnAction"

This reverts commit f6c863c13bc840cba983ed12232725b8a8552cb4.
This commit is contained in:
Tom Hvitved
2023-02-20 11:43:51 +01:00
committed by Harry Maclean
parent 710ddb1f96
commit 9880952e72

View File

@@ -65,14 +65,13 @@ module Filters {
not exists(this.getOnlyArgument()) and
forall(string except | except = this.getExceptArgument() | result.getName() != except)
) and
// This is a simple heuristic and will miss some cases.
(
// The action is in the same class as this call
result = lookupMethod(this.getExpr().getEnclosingModule().getModule(), _)
result = this.getExpr().getEnclosingModule().getAMethod()
or
// or the action is in an immediate subclass of this call
result.getEnclosingModule().getModule().getAnImmediateAncestor() =
this.getExpr().getEnclosingModule().getModule()
exists(ModuleBase m |
m.getModule() = this.getExpr().getEnclosingModule().getModule().getADescendent() and
result = m.getAMethod()
)
)
}