]> granicus.if.org Git - clang/commitdiff
Add a default clause to avoid this GCC warning:
authorNick Lewycky <nicholas@mxc.ca>
Tue, 30 Nov 2010 01:28:32 +0000 (01:28 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Tue, 30 Nov 2010 01:28:32 +0000 (01:28 +0000)
Type.cpp:1000: warning: control reaches end of non-void function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120376 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Type.cpp

index 56cd4dddb5c6b8f45212346af1ee2e387b090859..f1b6470417a6b69da7072063b68be3343d37595d 100644 (file)
@@ -965,6 +965,7 @@ const char *Type::getTypeClassName() const {
 
 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";