forked from OSchip/llvm-project
Serialize InitListExpr's initializesStdInitializerList bit, so it's not left uninitialized.
Found by valgrind. llvm-svn: 151527
This commit is contained in:
parent
d84e16e6a3
commit
169f436870
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue