[cfe-commits] r67325 - /cfe/trunk/Driver/clang.cpp
Ted Kremenek
kremenek at apple.com
Thu Mar 19 12:02:20 PDT 2009
Author: kremenek
Date: Thu Mar 19 14:02:20 2009
New Revision: 67325
URL: http://llvm.org/viewvc/llvm-project?rev=67325&view=rev
Log:
Per Daniel's suggestion, remove default case from switch statement to make
uncaught language cases a compile warning instead of a runtime error.
Modified:
cfe/trunk/Driver/clang.cpp
Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=67325&r1=67324&r2=67325&view=diff
==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Thu Mar 19 14:02:20 2009
@@ -571,7 +571,7 @@
if (LangStd == lang_unspecified) {
// Based on the base language, pick one.
switch (LK) {
- default: assert(0 && "Unknown base language");
+ case lang_unspecified: assert(0 && "Unknown base language");
case langkind_c:
case langkind_asm_cpp:
case langkind_c_cpp:
More information about the cfe-commits
mailing list