C#: Disregards compiler generated virtual calls as problematic virtual calls.

This commit is contained in:
Michael Nebel
2025-01-13 10:13:03 +01:00
parent 77f9f4c532
commit 2bff2d646f

View File

@@ -34,7 +34,9 @@ predicate overriddenSealed(RefType t, Virtualizable d) {
}
predicate virtualAccessWithThisQualifier(Expr e, Member d) {
exists(VirtualMethodCall c | c = e and c.getTarget() = d and c.hasThisQualifier())
exists(VirtualMethodCall c |
c = e and c.getTarget() = d and c.hasThisQualifier() and not c.isImplicit()
)
or
exists(VirtualMethodAccess c | c = e and c.getTarget() = d and c.hasThisQualifier())
or