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

Member predicate SwitchCase::terminatesInBreakStmt

Holds if the last statement, as determined by getLastStmt, under this ‘switch case’ statement is a ‘break’ statement.

For example, for

switch (i) {
case 5:
    x = 1;
    break;
case 6:
case 7:
    { x = 2; break; }
default:
    { x = 3; { x = 4; break; } }
}

this holds for case 5:, case 7: and default:, but not for case 6:.

predicate terminatesInBreakStmt()