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

Member predicate ForStmt::conditionAlwaysFalse

Holds if the loop condition is provably false.

For example, this holds for

for(x = 0; 0; ++x) { sum += x; }
predicate conditionAlwaysFalse()