[llvm] r303365 - Reduce gcc-7 warnings by fall-through comments.

Galina Kistanova via llvm-commits llvm-commits at lists.llvm.org
Thu May 18 13:15:02 PDT 2017


Thanks Davide, good idea.

Thanks

Galina


On Thu, May 18, 2017 at 11:19 AM, Davide Italiano <davide at freebsd.org>
wrote:

> On Thu, May 18, 2017 at 10:53 AM, Galina Kistanova via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: gkistanova
> > Date: Thu May 18 12:53:47 2017
> > New Revision: 303365
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=303365&view=rev
> > Log:
> > Reduce gcc-7 warnings by fall-through comments.
> >
> > Modified:
> >     llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
> >
> > Modified: llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/
> Demangle/ItaniumDemangle.cpp?rev=303365&r1=303364&r2=303365&view=diff
> > ============================================================
> ==================
> > --- llvm/trunk/lib/Demangle/ItaniumDemangle.cpp (original)
> > +++ llvm/trunk/lib/Demangle/ItaniumDemangle.cpp Thu May 18 12:53:47 2017
> > @@ -1947,7 +1947,7 @@ static const char *parse_type(const char
> >                break;
> >              }
> >            }
> > -        // drop through
> > +        // falls through
>
> I don' think this is the best way to fix this warning. You might
> consider using LLVM_FALLTRHOUGH (which will expand to
> [[gnu::fallthrough]] in this case). See the recent changes in `lld`
> for an example.
>
> Thanks!
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170518/25693b50/attachment.html>


More information about the llvm-commits mailing list