[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 12 12:08:45 PDT 2021


dblaikie added a comment.

In D107933#2942023 <https://reviews.llvm.org/D107933#2942023>, @xbolva00 wrote:

> GCC does not warn (with common -Wall) for this case, right? I think Clang should not as well.
>
> ImplicitFallthroughUnreachable could be enabled with -Wunreachable-code, if you think we should have it.

Yeah, some of that was discussed on the bug: https://bugs.llvm.org/show_bug.cgi?id=51094 & I'd still be in favor of that sort of direction. I might go so far as to say: Maybe we should drop this warning flag (and/or move it under -Wunreachable-code - questionable, I don't think anyone's really using that, it's pretty noisy still, I think) entirely even if no one's willing to reimplement it more robustly... not sure.


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