3 ms·
clang and gcc have a -Wimplicit-fallthrough warning flag that will warn about switch cases that fall through without either C++17's [[fallthrough]] attribute or
by cpeterso 5y ago
clang and gcc have a -Wimplicit-fallthrough warning flag that will warn about switch cases that fall through without either C++17's [[fallthrough]] attribute or a /* fallthrough */ comment.
I made Firefox's code base able to compile with -Wimplicit-fallthrough. About one hundred fall through cases needed to be annotated and about 2-3 were actual bugs (though minor).