[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning
Nathan Chancellor via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 13 11:11:52 PDT 2021
nathanchance added a comment.
In D107933#2942430 <https://reviews.llvm.org/D107933#2942430>, @xbolva00 wrote:
> Yes, something like that, plus I think you want put UnreachableCodeFallthrough into group UnreachableCode as well.
So you would recommend adding it to `UnreachableCode` rather than `UnreachableCodeAggressive`?
In D107933#2942432 <https://reviews.llvm.org/D107933#2942432>, @dblaikie wrote:
> Probably still worth fixing the bug too? (though maybe not a priority once it's moved out into -Wunreachable-code) - though the general fix, as discussed on the bug (comment 18 and 19 about why this doesn't already produce an unreachable-code warning), may require a significant amount of work.
I guess not warning on fallthrough attributes that are preceded by an if statement with an integer constant would remove all problematic instances in the kernel I believe. I am just not sure how to put that into code :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107933/new/
https://reviews.llvm.org/D107933
More information about the cfe-commits
mailing list