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

Member predicate SwitchStmt::getExpr

Gets the expression that this ‘switch’ statement switches on.

For example, for

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

the result is i.

Expr getExpr()