fix PR4073 by making designated initializer checking code use
VerifyIntegerConstantExpression instead of isIntegerConstantExpr.
This makes it ext-warn but tolerate things that fold to a constant
but that are not valid i-c-e's.

There must be a bug in the i-c-e computation though, because it
doesn't catch this case even with pedantic.

This also switches the later code to use EvaluateAsInt which is
simpler and handles everything that evaluate does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70081 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 474670d..e7d5ee1 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -4928,8 +4928,7 @@
   return isInvalid;
 }
 
-bool Sema::VerifyIntegerConstantExpression(const Expr* E, llvm::APSInt *Result)
-{
+bool Sema::VerifyIntegerConstantExpression(const Expr *E, llvm::APSInt *Result){
   Expr::EvalResult EvalResult;
 
   if (!E->Evaluate(EvalResult, Context) || !EvalResult.Val.isInt() ||