[cfe-commits] [PATCH] Implicit fall-through between switch labels

Chandler Carruth chandlerc at google.com
Sat Apr 21 16:11:23 PDT 2012


On Sat, Apr 21, 2012 at 3:52 PM, David Blaikie <dblaikie at gmail.com> wrote:

> On Sat, Apr 21, 2012 at 3:26 PM, Chandler Carruth <chandlerc at google.com>
> wrote:
> > On Sat, Apr 21, 2012 at 11:00 AM, Matthieu Monrocq
> > <matthieu.monrocq at gmail.com> wrote:
> >>
> >> Two remarks:
> >>
> >> > if there is no statement between two cases, then fallthrough is most
> >> > probable
> >> > otherwise it is not possible to actually distinguish between a
> possible
> >> > fallthrough or break
> >>
> >> I don't think that providing a fixit is reasonable, because fixit should
> >> be provided only when they are right, taking chances is risking
> >> miscompilation.
> >
> >
> > Note that these are fixit hints on *notes* attached to the diagnostic.
>
> Except that's the thing - in the current code out for review, there's
> only two warnings being added, and no notes (one warning for
> fallthrough without the attribute, one warning for using the attribute
> in non case statements).
>

Sorry, I chatted w/ Alex about this in person, and thought those changes
had been made already. =] Teach me to not read the patch. Yes, we're all in
agreement that these should be notes, not attached to the warning. =]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120421/bc86bdba/attachment.html>


More information about the cfe-commits mailing list