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

Member predicate EnumerableCollectionExpr::getAnEmptinessCheck

Gets an expression that tests whether this expression is empty.

If the returned expression has abstract value v, then this expression is guaranteed to be empty if isEmpty is true, and non-empty if isEmpty is false.

For example, if the expression x.Length != 0 evaluates to true then the expression x is guaranteed to be non-empty.

Expr getAnEmptinessCheck(AbstractValue v, boolean isEmpty)