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

Member predicate ForStmt::getAnInitializer

Gets an initializer expression of this for loop, if any.

For example, i = 0 in

for (int i = 0; i < 10; i++) {
  ...
}
Expr getAnInitializer()