[clang-tools-extra] [clang-tidy] Fix readability-else-after-return for if statements appear in unbraced switch case labels (PR #181878)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 18 02:03:49 PST 2026
https://github.com/zwuis commented:
While we are here, how about handling labels (used for `goto`) as well?
---
We should handle fallthrough, which is common. You might write a new matcher to detect it.
```cpp
case 0:
case 1:
// arbitrary number of `case`
```
https://github.com/llvm/llvm-project/pull/181878
More information about the cfe-commits
mailing list