mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
46 lines
438 B
C++
46 lines
438 B
C++
|
|
void test(int x) {
|
|
int y = 0;
|
|
|
|
switch (x)
|
|
{
|
|
case 1:
|
|
break;
|
|
case 2:
|
|
case 3:
|
|
[[clang::fallthrough]];
|
|
|
|
case 4:
|
|
y++;
|
|
break;
|
|
case 5:
|
|
y++;
|
|
case 6:
|
|
y++;
|
|
[[clang::fallthrough]];
|
|
case 7:
|
|
[[clang::fallthrough]];
|
|
y++;
|
|
|
|
case 8:
|
|
{
|
|
y++;
|
|
} break;
|
|
case 9:
|
|
{
|
|
y++;
|
|
}
|
|
case 10:
|
|
{
|
|
y++;
|
|
[[clang::fallthrough]];
|
|
}
|
|
case 11:
|
|
{
|
|
y++;
|
|
} [[clang::fallthrough]];
|
|
default:
|
|
[[clang::fallthrough]];
|
|
}
|
|
}
|