CodeQL library for C#
codeql/csharp-all 0.9.2-dev (changelog, source)
Search

Predicate Internal::getNullEquivParent

Gets the parent expression of e which is null iff e is null, if any. For example, result = x?.y and e = x, or result = x + 1 and e = x.

Import path

import semmle.code.csharp.controlflow.Guards
Expr getNullEquivParent(Expr e)