| Issue |
182822
|
| Summary |
False positive -Wimplicit-fallthrough
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
stbergmann
|
With recent LLVM 23 trunk,
```
$ cat test.cc
void f(int n) {
switch(n) {
case 0:
try {
if (n) {
try {} catch(int) {}
}
} catch(...) {}
}
}
```
```
$ clang++ -Wimplicit-fallthrough -fsyntax-only test.cc
test.cc:3:5: warning: unannotated fall-through between switch labels
[-Wimplicit-fallthrough]
3 | case 0:
| ^
test.cc:3:5: note: insert '[[fallthrough]];' to silence this warning
3 | case 0:
| ^
| [[fallthrough]];
test.cc:3:5: note: insert 'break;' to avoid fall-through
3 | case 0:
| ^
| break;
1 warning generated.
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs