-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
accepts-invalidclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzergood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Description
https://godbolt.org/z/j4b69q1dq
void Func(int x) {
switch (x) {
[[likely]] case 0:
case 1:
int i = 3;
case 2:
break;
}
switch (x) {
case 0:
case 1:
int i = 3;
case 2:
break;
}
}
<source>:14:9: error: cannot jump from switch statement to this case label
14 | case 2:
| ^
<source>:13:17: note: jump bypasses variable initialization
13 | int i = 3;
|
Metadata
Metadata
Assignees
Labels
accepts-invalidclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzergood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute