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

Member predicate SwitchStmt::getSwitchCase

Gets the nth ‘switch case’ statement of this ‘switch’ statement, where n is 0-based.

For example, for

switch(i) {
case 5:
case 6:
default:
}   * ```
0 yields `case 5:`, 1 yields `case 6:`, and 2 yields `default:`.
SwitchCase getSwitchCase(int n)