Hi cfe-commits,<div><br></div><div>This patch adds a "soft opt-in" option for <font face="courier new, monospace">-Wimplicit-fallthrough</font> diagnostics. 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 <font face="courier new, monospace">-Wimplicit-fallthrough</font>.</div>
<div><br></div><div>This mode is controlled with <font face="courier new, monospace">-Wimplicit-fallthrough-per-method</font> diagnostic option (implies <font face="courier new, monospace">-Wimplicit-fallthrough</font>). 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.</div>
<div><div><div><br></div><div>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.</div><div><br></div><div>
Please review this patch.</div><div>Thank you!</div><div><br></div>-- <br>
<div>Best regards,</div><div>Alexander Kornienko</div></div></div>