static_cast, reinterpret_cast, and const_cast can all be used in C++
integral constant expressions (for conversions to integer types,
naturally). I don't *think* that const_casts will ever get to this
point, but I also can't convince myself that they won't... so I've
taken the safe route and allowed the ICE checking code to look at
const_cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81453 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index a90b998..2e2f359 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1464,7 +1464,10 @@
   }
   case Expr::ImplicitCastExprClass:
   case Expr::CStyleCastExprClass:
-  case Expr::CXXFunctionalCastExprClass: {
+  case Expr::CXXFunctionalCastExprClass:
+  case Expr::CXXStaticCastExprClass:
+  case Expr::CXXReinterpretCastExprClass:
+  case Expr::CXXConstCastExprClass: {
     const Expr *SubExpr = cast<CastExpr>(E)->getSubExpr();
     if (SubExpr->getType()->isIntegralType())
       return CheckICE(SubExpr, Ctx);