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

Member predicate EnumSwitch :: getAMissingCase

Gets a constant from the enum type that does not have a case in this ‘switch’ statement.

For example, with

enum color { RED, GREEN, BLUE };
enum color c;
switch (c) {
case RED:
    return 1;
    return 2;

there are results GREEN and BLUE.

EnumConstant getAMissingCase ( )