mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
C#: Take null conditional assignments into account in MaybeNullExpr.
This commit is contained in:
@@ -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`. */
|
||||
|
||||
Reference in New Issue
Block a user