]> granicus.if.org Git - clang/commitdiff
silence some warnings.
authorChris Lattner <sabre@nondot.org>
Thu, 2 Aug 2007 21:50:34 +0000 (21:50 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 2 Aug 2007 21:50:34 +0000 (21:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40761 91177308-0d34-0410-b5e6-96231b3b80d8

CodeGen/CodeGenTypes.cpp

index b376a310093b22f85f829bf25cedb6ee149b08c5..3854465ea49a264f17449a620aa6175326a03f49 100644 (file)
@@ -29,6 +29,10 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T) {
   const clang::Type &Ty = *T.getCanonicalType();
   
   switch (Ty.getTypeClass()) {
+  case Type::TypeName:        // typedef isn't canonical.
+  case Type::TypeOfExp:       // typeof isn't canonical.
+  case Type::TypeOfTyp:       // typeof isn't canonical.
+    assert(0 && "Non-canonical type, shouldn't happen");
   case Type::Builtin: {
     switch (cast<BuiltinType>(Ty).getKind()) {
     case BuiltinType::Void:
@@ -128,7 +132,6 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T) {
     
     return llvm::FunctionType::get(ResultType, ArgTys, isVarArg, 0);
   }
-  case Type::TypeName:
   case Type::Tagged:
     break;
   }