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

Member predicate ForStmt::getADeclaration

Gets a declaration from the initialization statement of this ‘for’ statement.

For example, for

for(int x = 0, y = 10; x != y; ++x) { sum += x; }

the results are x and y, while for

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

there are no results.

Declaration getADeclaration()