<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 24, 2019 at 3:50 PM Jinsong Ji via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Jinsong Ji<br>
Date: 2019-10-24T22:49:17Z<br>
New Revision: 9671d1dc1764701824913ecca2b76ab17c33c29e<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/9671d1dc1764701824913ecca2b76ab17c33c29e" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/9671d1dc1764701824913ecca2b76ab17c33c29e</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/9671d1dc1764701824913ecca2b76ab17c33c29e.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/9671d1dc1764701824913ecca2b76ab17c33c29e.diff</a><br>
<br>
LOG: [clang]Fixup clang -Werror,,-Wcovered-switch-default build failures<br>
<br>
llvm/clang/lib/CodeGen/CGBuiltin.cpp:6877:3: error: default label in<br>
switch which covers all enumeration values<br>
[-Werror,-Wcovered-switch-default]<br>
<br>
Similar to<br>
<a href="https://reviews.llvm.org/rG7b3de1e811972b874d91554642ccb2ef5b32eed6" rel="noreferrer" target="_blank">https://reviews.llvm.org/rG7b3de1e811972b874d91554642ccb2ef5b32eed6</a><br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
clang/lib/CodeGen/CGBuiltin.cpp<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp<br>
index c35d0a88e761..2caa8509ea06 100644<br>
--- a/clang/lib/CodeGen/CGBuiltin.cpp<br>
+++ b/clang/lib/CodeGen/CGBuiltin.cpp<br>
@@ -6873,9 +6873,6 @@ Value *CodeGenFunction::EmitARMMVEBuiltinExpr(unsigned BuiltinID,<br>
}<br>
return ToReturn;<br>
}<br>
-<br>
- default:<br>
- llvm_unreachable("bad CustomCodegen enum value");<br>
}<br>
}<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>