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

David Blaikie dblaikie at gmail.com
Mon May 28 22:39:07 PDT 2012


On Mon, May 28, 2012 at 6:11 PM, Alexander Kornienko <alexfh at google.com>wrote:

> Hi,
>
> Is anyone interested in this?
>

Hard to say - it's only been 3 days which happen to coincide with a long
weekend here in the USA, so it's not likely people have had a chance to
respond or ignore this just yet :)

- David


>
>
> 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
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120528/86635bb5/attachment.html>


More information about the cfe-commits mailing list