summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index fee94568b78..5304fd9f7a5 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -22,6 +22,7 @@
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Parse/DeclSpec.h"
+#include "clang/Parse/Designator.h"
#include "clang/Parse/Scope.h"
using namespace clang;
@@ -1260,7 +1261,8 @@ ActOnInitList(SourceLocation LBraceLoc, ExprTy **initlist, unsigned NumInit,
// Semantic analysis for initializers is done by ActOnDeclarator() and
// CheckInitializer() - it requires knowledge of the object being intialized.
- InitListExpr *E = new InitListExpr(LBraceLoc, InitList, NumInit, RBraceLoc);
+ InitListExpr *E = new InitListExpr(LBraceLoc, InitList, NumInit, RBraceLoc,
+ Designators.hasAnyDesignators());
E->setType(Context.VoidTy); // FIXME: just a place holder for now.
return E;
}
OpenPOWER on IntegriCloud