C#: Fix some Ql4Ql violations.

This commit is contained in:
Michael Nebel
2025-09-01 14:57:30 +02:00
parent b4d6cb6e5f
commit 7491352278
13 changed files with 32 additions and 28 deletions

View File

@@ -12,7 +12,7 @@ module CallTargetStats implements StatsSig {
private predicate isNoSetterPropertyCallInConstructor(PropertyCall c) {
exists(Property p, Constructor ctor |
p = c.getProperty() and
not exists(Setter a | a = p.getAnAccessor()) and
not p.getAnAccessor() instanceof Setter and
c.getEnclosingCallable() = ctor and
(
c.hasThisQualifier()
@@ -25,7 +25,7 @@ module CallTargetStats implements StatsSig {
private predicate isNoSetterPropertyInitialization(PropertyCall c) {
exists(Property p, AssignExpr assign |
p = c.getProperty() and
not exists(Setter a | a = p.getAnAccessor()) and
not p.getAnAccessor() instanceof Setter and
assign = c.getParent() and
assign.getLValue() = c and
assign.getParent() instanceof Property