Author: Jinsong Ji Date: 2020-01-14T16:21:42Z New Revision: e2b8e2113a4929027a237b67f7be86db4ec103d3
URL: https://github.com/llvm/llvm-project/commit/e2b8e2113a4929027a237b67f7be86db4ec103d3 DIFF: https://github.com/llvm/llvm-project/commit/e2b8e2113a4929027a237b67f7be86db4ec103d3.diff LOG: [clang][OpenCL] Fix covered switch warning -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. Reviewed By: svenvh Differential Revision: https://reviews.llvm.org/D72707 Added: Modified: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp Removed: ################################################################################ diff --git a/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp b/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp index dcdc4bf12e98..41d33b550680 100644 --- a/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp +++ b/clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp @@ -751,9 +751,7 @@ static void OCL2Qual(ASTContext &Context, const OpenCLTypeStruct &Ty, } // 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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits