CodeQL library for C/C++
codeql/cpp-all 0.12.9 (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()