Java: Remove low-confidence dispatch to known neutrals.

This commit is contained in:
Anders Schack-Mulligen
2023-03-14 11:17:01 +01:00
parent 04f422ea5d
commit dbfc256f40
5 changed files with 12 additions and 1 deletions

View File

@@ -11,6 +11,8 @@ private module DispatchImpl {
private predicate hasHighConfidenceTarget(Call c) {
exists(SummarizedCallable sc | sc.getACall() = c and not sc.isAutoGenerated())
or
exists(NeutralCallable nc | nc.getACall() = c and nc.isManual())
or
exists(Callable srcTgt |
srcTgt = VirtualDispatch::viableCallable(c) and
not VirtualDispatch::lowConfidenceDispatchTarget(c, srcTgt)