[cfe-commits] r130647 - /cfe/trunk/lib/Sema/SemaExprCXX.cpp

Chandler Carruth chandlerc at gmail.com
Sun May 1 00:44:17 PDT 2011


Author: chandlerc
Date: Sun May  1 02:44:17 2011
New Revision: 130647

URL: http://llvm.org/viewvc/llvm-project?rev=130647&view=rev
Log:
Remove the default case from the unary type trait evaluation function,
adding an unreachable annotation. Remarkably this one was already
enumarting every trait.

Modified:
    cfe/trunk/lib/Sema/SemaExprCXX.cpp

Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=130647&r1=130646&r2=130647&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sun May  1 02:44:17 2011
@@ -2462,8 +2462,6 @@
 
   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 @@
     //   function call.
     return !T->isIncompleteType();
   }
+  llvm_unreachable("Type trait not covered by switch");
 }
 
 





More information about the cfe-commits mailing list