r189575 - Removed useless default branch of switch statement.

Serge Pavlov sepavloff at gmail.com
Thu Aug 29 08:47:38 PDT 2013


Buildbot sanitizer-x86_64-linux-bootstrap reported an error (build 418):

/home/dtoolsbot/build/sanitizer-x86_64-linux/build/llvm/tools/clang/lib/Sema/SemaLookup.cpp:1874:3:
error: default label in switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
  default:
  ^
1 error generated.

You are absolutely right, it is -Wcovered-switch-default.



2013/8/29 David Blaikie <dblaikie at gmail.com>

> On Thu, Aug 29, 2013 at 1:20 AM, Serge Pavlov <sepavloff at gmail.com> wrote:
> > Author: sepavloff
> > Date: Thu Aug 29 03:20:07 2013
> > New Revision: 189575
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=189575&view=rev
> > Log:
> > Removed useless default branch of switch statement.
> > The problem was caught by sanitizer build.
>
> Caught in what way? I'm not sure how any of the sanitizers would help
> with this specific issue. Was this just a -Wcovered-switch-default
> warning/break?
>
> >
> > Modified:
> >     cfe/trunk/lib/Sema/SemaLookup.cpp
> >
> > Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=189575&r1=189574&r2=189575&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
> > +++ cfe/trunk/lib/Sema/SemaLookup.cpp Thu Aug 29 03:20:07 2013
> > @@ -1870,9 +1870,6 @@ void Sema::DiagnoseAmbiguousLookup(Looku
> >        Diag((*DI)->getLocation(), diag::note_ambiguous_candidate) << *DI;
> >      break;
> >    }
> > -
> > -  default:
> > -    llvm_unreachable("unknown ambiguity kind");
> >    }
> >  }
> >
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



-- 
Thanks,
--Serge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130829/779f401d/attachment.html>


More information about the cfe-commits mailing list