[cfe-commits] [PATCH] "Soft opt-in" option for -Wimplicit-fallthrough

Alexander Kornienko alexfh at google.com
Mon May 28 18:11:08 PDT 2012


Is anyone interested in this?

On Sat, May 26, 2012 at 1:33 AM, Alexander Kornienko <alexfh at google.com>wrote:

> Hi cfe-commits,
> This patch adds a "soft opt-in" option for -Wimplicit-fallthroughdiagnostics. The reason for it is to provide a way to start using
> fall-through annotations without breaking (when treating warnings as
> errors) all code with unannotated fall-throughs. So it's only meant to be
> used for large code bases during a transition phase prior to turning on
> -Wimplicit-fallthrough.
> This mode is controlled with -Wimplicit-fallthrough-per-method diagnostic
> option (implies -Wimplicit-fallthrough). It enables switch cases
> fall-through diagnostic only for methods which contain at least one
> fall-through annotation. This will allow to fix 'unannotated fall-through'
> warnings method-by-method and will help to avoid regressions in all
> methods, where fall-through annotations were already added.
> This mode will probably be not very helpful for finding real bugs, but it
> will help to go smoothly through a transition period before switching on
> the real diagnostic.
> Please review this patch.
> Thank you!
> --
> Best regards,
> Alexander Kornienko

Best regards,
Alexander Kornienko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120529/ae793efa/attachment.html>

More information about the cfe-commits mailing list