File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
csharp/ql/lib/semmle/code/csharp/controlflow Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -442,13 +442,16 @@ class DereferenceableExpr extends Expr {
442442
443443 /** Holds if `guard` suggests that this expression may be `null`. */
444444 predicate guardSuggestsMaybeNull ( Guards:: Guard guard ) {
445- guard = this .getANullnessNullCheck ( _, true )
446- or
447- LogicInput:: additionalNullCheck ( guard , _, this , true )
448- or
449- guard .isEquality ( this , any ( Expr n | nullValueImplied ( n ) ) , _)
450- or
451- Guards:: nullGuard ( guard , any ( GuardValue v | exists ( v .asBooleanValue ( ) ) ) , this , true )
445+ not nonNullValueImplied ( this ) and
446+ (
447+ guard = this .getANullnessNullCheck ( _, true )
448+ or
449+ LogicInput:: additionalNullCheck ( guard , _, this , true )
450+ or
451+ guard .isEquality ( this , any ( Expr n | nullValueImplied ( n ) ) , _)
452+ or
453+ Guards:: nullGuard ( guard , any ( GuardValue v | exists ( v .asBooleanValue ( ) ) ) , this , true )
454+ )
452455 }
453456}
454457
You can’t perform that action at this time.
0 commit comments