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

Member predicate SwitchStmt::getDefaultCase

Gets the ‘default case’ statement of this ‘switch’ statement, if any.

For example, for

switch(i) {
    case 1:
    case 2:
    break;
    default:
    break;
}

the result is default:, but there is no result for

switch(i) {
    case 1:
    case 2:
    break;
}
DefaultCase getDefaultCase()