C#: Use expression flow state to determine non-null guards

This commit is contained in:
Calum Grant
2019-12-12 18:08:01 +00:00
committed by Calum Grant
parent 2eb29224e8
commit a1bedf2e06
6 changed files with 259 additions and 0 deletions

View File

@@ -846,6 +846,8 @@ module Internal {
or
e instanceof ArrayCreation
or
e.hasNotNullFlowState()
or
e.hasValue() and
exists(Expr stripped | stripped = e.stripCasts() |
not stripped instanceof NullLiteral and