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