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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 13 11:42:38 PDT 2021


aaron.ballman added a comment.

In D107933#2944135 <https://reviews.llvm.org/D107933#2944135>, @nathanchance wrote:

> 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`?

I would recommend adding it to `UnreachableCode` as I don't see this being a particularly aggressive unreachable warning. FWIW, I would be opposed to dropping the diagnostic entirely as the standard recommends diagnosing an unreachable fallthrough statement (https://eel.is/c++draft/dcl.attr.fallthrough#2.sentence-2 and the similar wording in C2x 6.7.11.5p3.


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