]> granicus.if.org Git - clang/commitdiff
Remove the default case from the unary type trait evaluation function,
authorChandler Carruth <chandlerc@gmail.com>
Sun, 1 May 2011 07:44:17 +0000 (07:44 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 1 May 2011 07:44:17 +0000 (07:44 +0000)
adding an unreachable annotation. Remarkably this one was already
enumarting every trait.

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

lib/Sema/SemaExprCXX.cpp

index 418285d71b3f3fd3c4908a6e1531ca8116e1cf60..4d5074a13b7de1246b8e35a4421b59a6344177f7 100644 (file)
@@ -2462,8 +2462,6 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, UnaryTypeTrait UTT,
 
   ASTContext &C = Self.Context;
   switch(UTT) {
-  default: assert(false && "Unknown type trait or not implemented");
-
     // Type trait expressions corresponding to the primary type category
     // predicates in C++0x [meta.unary.cat].
   case UTT_IsVoid:
@@ -2750,6 +2748,7 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, UnaryTypeTrait UTT,
     //   function call.
     return !T->isIncompleteType();
   }
+  llvm_unreachable("Type trait not covered by switch");
 }