mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #20734 from aschackmull/csharp/tweak-nullness
C#: Allow nullness sources with SSA at entry.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user