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

Predicate foreachEmptiness

Holds if cfe is the element inside foreach statement fs that has the emptiness completion.

Import path

import semmle.code.csharp.controlflow.internal.Completion
predicate foreachEmptiness(ForeachStmt fs, ControlFlowElement cfe)