summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-26 23:43:26 +0000
committerChris Lattner <sabre@nondot.org>2008-10-26 23:43:26 +0000
commit07d754acf11590af580bcc4b8816105a60ebb8fe (patch)
tree826faaa9f03a4d583f6fc74cf49b69879832d94a /clang/lib/AST/Expr.cpp
parent248388e3131be2fda43387653ced370b6aaf95b2 (diff)
downloadbcm5719-llvm-07d754acf11590af580bcc4b8816105a60ebb8fe.tar.gz
bcm5719-llvm-07d754acf11590af580bcc4b8816105a60ebb8fe.zip
Remember whether an initlist had a designator in the AST.
llvm-svn: 58218
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index c20ca25f283..f18586fb709 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -204,13 +204,12 @@ const char *BinaryOperator::getOpcodeStr(Opcode Op) {
}
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.
OpenPOWER on IntegriCloud