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