[llvm] r303454 - Added missing break.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 14:14:17 PDT 2017
On Fri, May 19, 2017 at 2:11 PM, Galina Kistanova <gkistanova at gmail.com> wrote:
> This is an obvious case.
> Here is the original code flow:
>
> switch (Name[0]) {
> ...
> case 'n': {
> if (Name.startswith("nvvm.")) {
> ...
> }
> }
> case 'o':
> ...
> if (Name.startswith("objectsize.")) {
> ...
> }
> break;
> ...
>
> If the Name starts with 'n' but falls through to the next case, the
> expression in the second if is always false, so it always hit the second
> break after it falls through.
>
> There is no functional change.
>
What's the GCC warning?
--
Davide
More information about the llvm-commits
mailing list