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

Member predicate BlockStmt::getLastStmtIn

Gets the last body statement of this block. If this last statement is itself a block, returns the last statement of that block, and so on.

For example, for the block

{ int a; int b = 1; { a = b; } }

the result is the expression statement a = b.

Stmt getLastStmtIn()