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

Member predicate CollectionExpr::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)