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

Member predicate ForStmt::conditionAlwaysTrueUponEntry

Holds if the loop condition is provably true upon entry, that is, at least one iteration of the loop is guaranteed.

For example, with

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

the condition i < 10 always evaluates to true upon entry since i = 0, but the condition will evaluate to false after 10 iterations.

predicate conditionAlwaysTrueUponEntry()