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

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)