[cfe-commits] r120376 - /cfe/trunk/lib/AST/Type.cpp
Nick Lewycky
nicholas at mxc.ca
Mon Nov 29 17:28:32 PST 2010
Author: nicholas
Date: Mon Nov 29 19:28:32 2010
New Revision: 120376
URL: http://llvm.org/viewvc/llvm-project?rev=120376&view=rev
Log:
Add a default clause to avoid this GCC warning:
Type.cpp:1000: warning: control reaches end of non-void function
Modified:
cfe/trunk/lib/AST/Type.cpp
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=120376&r1=120375&r2=120376&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Mon Nov 29 19:28:32 2010
@@ -965,6 +965,7 @@
const char *BuiltinType::getName(const LangOptions &LO) const {
switch (getKind()) {
+ default: assert(0 && "Invalid builtin type!");
case Void: return "void";
case Bool: return LO.Bool ? "bool" : "_Bool";
case Char_S: return "char";
More information about the cfe-commits
mailing list