CodeQL library for C/C++
codeql/cpp-all 2.1.1 (changelog, source)
Search

Member predicate ForStmt::getUpdate

Gets the update expression of this ‘for’ statement.

For example, for

for (i = 0; i < 10; i++) { j++; }

the result is i++.

Does not hold if the update expression is omitted, as in

for (i = 0; i < 10;) { i++; }
Expr getUpdate()