Remember whether an initlist had a designator in the AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58218 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index c20ca25..f18586f 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -204,13 +204,12 @@
}
InitListExpr::InitListExpr(SourceLocation lbraceloc,
- Expr **initexprs, unsigned numinits,
- SourceLocation rbraceloc)
+ Expr **initExprs, unsigned numInits,
+ SourceLocation rbraceloc, bool hadDesignators)
: Expr(InitListExprClass, QualType()),
- LBraceLoc(lbraceloc), RBraceLoc(rbraceloc)
-{
- for (unsigned i = 0; i != numinits; i++)
- InitExprs.push_back(initexprs[i]);
+ LBraceLoc(lbraceloc), RBraceLoc(rbraceloc), HadDesignators(hadDesignators) {
+
+ InitExprs.insert(InitExprs.end(), initExprs, initExprs+numInits);
}
/// getFunctionType - Return the underlying function type for this block.