CodeQL library for C/C++
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()