C#: Allow nullness sources with SSA at entry.

This commit is contained in:
Anders Schack-Mulligen
2025-10-31 11:25:37 +01:00
parent 26f59a8786
commit 5aa53287ce

View File

@@ -197,7 +197,6 @@ private predicate defMaybeNull(
msg = "as suggested by $@ null check" and
node = def.getControlFlowNode() and
not de = any(Ssa::PhiNode phi).getARead() and
strictcount(Element e | e = any(Ssa::Definition def0 | de = def0.getARead()).getElement()) = 1 and
// Don't use a check as reason if there is a `null` assignment
// or argument
not def.(Ssa::ExplicitDefinition).getADefinition().getSource() instanceof MaybeNullExpr and