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

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


Author: chandlerc
Date: Sun May  1 02:23:17 2011
New Revision: 130644

URL: http://llvm.org/viewvc/llvm-project?rev=130644&view=rev
Log:
Mark that this function ends in a covering switch statement with every
case returning a value.

Silences a GCC warning.

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=130644&r1=130643&r2=130644&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sun May  1 02:23:17 2011
@@ -28,6 +28,7 @@
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Lex/Preprocessor.h"
 #include "llvm/ADT/STLExtras.h"
+#include "llvm/Support/ErrorHandling.h"
 using namespace clang;
 using namespace sema;
 
@@ -2451,6 +2452,7 @@
     return !S.RequireCompleteType(
       Loc, ElTy, diag::err_incomplete_type_used_in_type_trait_expr);
   }
+  llvm_unreachable("Type trait not handled by switch");
 }
 
 static bool EvaluateUnaryTypeTrait(Sema &Self, UnaryTypeTrait UTT,





More information about the cfe-commits mailing list