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

Member predicate SwitchCase::getExpr

Gets the expression of this ‘switch case’ statement (or the start of the range if there is a GNU case range). Does not exist for a DefaultCase.

For example, for

case 5:

the result is 5, for

case 6 ... 7:

the result is 6, and there is no result for

Expr getExpr()