FWIW that probably produces a -Wreturn-type warning because other compilers don't conservatively assume that only the enumerator values can be in an enum variable (rather than all of its representable values). The subsequent -Wreturn-type warning was fixed in 45787e56829f (moving the unreachable to after the switch) - just mentioning for next time.
On Thu, Oct 24, 2019 at 3:50 PM Jinsong Ji via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > Author: Jinsong Ji > Date: 2019-10-24T22:49:17Z > New Revision: 9671d1dc1764701824913ecca2b76ab17c33c29e > > URL: > https://github.com/llvm/llvm-project/commit/9671d1dc1764701824913ecca2b76ab17c33c29e > DIFF: > https://github.com/llvm/llvm-project/commit/9671d1dc1764701824913ecca2b76ab17c33c29e.diff > > LOG: [clang]Fixup clang -Werror,,-Wcovered-switch-default build failures > > llvm/clang/lib/CodeGen/CGBuiltin.cpp:6877:3: error: default label in > switch which covers all enumeration values > [-Werror,-Wcovered-switch-default] > > Similar to > https://reviews.llvm.org/rG7b3de1e811972b874d91554642ccb2ef5b32eed6 > > Added: > > > Modified: > clang/lib/CodeGen/CGBuiltin.cpp > > Removed: > > > > > ################################################################################ > diff --git a/clang/lib/CodeGen/CGBuiltin.cpp > b/clang/lib/CodeGen/CGBuiltin.cpp > index c35d0a88e761..2caa8509ea06 100644 > --- a/clang/lib/CodeGen/CGBuiltin.cpp > +++ b/clang/lib/CodeGen/CGBuiltin.cpp > @@ -6873,9 +6873,6 @@ Value > *CodeGenFunction::EmitARMMVEBuiltinExpr(unsigned BuiltinID, > } > return ToReturn; > } > - > - default: > - llvm_unreachable("bad CustomCodegen enum value"); > } > } > > > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits