Fixed implementation of C89 6.5.7 p3.
Warning should be emitted only for InitListExpr nodes.

llvm-svn: 186859
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 840a735..8b7c472 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -7785,6 +7785,7 @@
       // for an object that has aggregate or union type shall be
       // constant expressions.
       else if (!getLangOpts().C99 && VDecl->getType()->isAggregateType() &&
+               isa<InitListExpr>(Init) &&
                !Init->isConstantInitializer(Context, false))
         Diag(Init->getExprLoc(),
              diag::ext_aggregate_init_not_constant)