[llvm] r303365 - Reduce gcc-7 warnings by fall-through comments.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 11:19:05 PDT 2017
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
More information about the llvm-commits
mailing list