[PATCH] D72707: [clang][OpenCL] Fix covered switch warning
Jinsong Ji via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 14 08:02:52 PST 2020
jsji created this revision.
jsji added a reviewer: svenvh.
Herald added subscribers: cfe-commits, Anastasia, yaxunl.
Herald added a project: clang.
jsji edited the summary of this revision.
-Werror clang build is broken now.
tools/clang/lib/Sema/OpenCLBuiltins.inc:11824:5: error: default label in
switch which covers all enumeration values
[-Werror,-Wcovered-switch-default]
default:
We don't need default now, since all enumeration values are covered.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72707
Files:
clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
Index: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
===================================================================
--- clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
+++ clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp
@@ -751,9 +751,7 @@
}
// End of switch statement.
- OS << " default:\n"
- << " llvm_unreachable(\"OpenCL builtin type not handled yet\");\n"
- << " } // end of switch (Ty.ID)\n\n";
+ OS << " } // end of switch (Ty.ID)\n\n";
// Step 2.
// Add ExtVector types if this was a generic type, as the switch statement
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72707.237980.patch
Type: text/x-patch
Size: 582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200114/19ee4687/attachment-0001.bin>
More information about the cfe-commits
mailing list