Serialize InitListExpr's initializesStdInitializerList bit, so it's not left uninitialized.

Found by valgrind.

llvm-svn: 151527
This commit is contained in:
Benjamin Kramer 2012-02-27 13:20:39 +00:00
parent d84e16e6a3
commit 169f436870
2 changed files with 2 additions and 0 deletions

View File

@ -618,6 +618,7 @@ void ASTStmtReader::VisitInitListExpr(InitListExpr *E) {
} else
E->ArrayFillerOrUnionFieldInit = ReadDeclAs<FieldDecl>(Record, Idx);
E->sawArrayRangeDesignator(Record[Idx++]);
E->setInitializesStdInitializerList(Record[Idx++]);
unsigned NumInits = Record[Idx++];
E->reserveInits(Reader.getContext(), NumInits);
if (isArrayFiller) {

View File

@ -598,6 +598,7 @@ void ASTStmtWriter::VisitInitListExpr(InitListExpr *E) {
else
Writer.AddDeclRef(E->getInitializedFieldInUnion(), Record);
Record.push_back(E->hadArrayRangeDesignator());
Record.push_back(E->initializesStdInitializerList());
Record.push_back(E->getNumInits());
if (isArrayFiller) {
// ArrayFiller may have filled "holes" due to designated initializer.