C#: Take null conditional assignments into account in MaybeNullExpr.

This commit is contained in:
Michael Nebel
2026-01-07 15:22:11 +01:00
parent f0135e93c5
commit 5942edf2d9

View File

@@ -43,6 +43,12 @@ private Expr maybeNullExpr(Expr reason) {
)
or
result.(NullCoalescingExpr).getRightOperand() = maybeNullExpr(reason)
or
result =
any(QualifiableExpr qe |
qe.isConditional() and
qe.getQualifier() = maybeNullExpr(reason)
)
}
/** An expression that may be `null`. */