[clang-tools-extra] [clang-tidy] Fix readability-else-after-return for if statements appear in unbraced switch case labels (PR #181878)
Berkay Sahin via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 18 11:52:51 PST 2026
berkaysahiin wrote:
> 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.
>
> ```c++
> case 0:
> case 1:
> // arbitrary number of `case`
> ```
Thanks for the review. Will address the issues as soon as I am available.
https://github.com/llvm/llvm-project/pull/181878
More information about the cfe-commits
mailing list