[cfe-commits] r151527 - in /cfe/trunk/lib/Serialization: ASTReaderStmt.cpp ASTWriterStmt.cpp

Benjamin Kramer benny.kra at googlemail.com
Mon Feb 27 05:20:39 PST 2012


Author: d0k
Date: Mon Feb 27 07:20:39 2012
New Revision: 151527

URL: http://llvm.org/viewvc/llvm-project?rev=151527&view=rev
Log:
Serialize InitListExpr's initializesStdInitializerList bit, so it's not left uninitialized.

Found by valgrind.

Modified:
    cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
    cfe/trunk/lib/Serialization/ASTWriterStmt.cpp

Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderStmt.cpp?rev=151527&r1=151526&r2=151527&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderStmt.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderStmt.cpp Mon Feb 27 07:20:39 2012
@@ -618,6 +618,7 @@
   } 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) {

Modified: cfe/trunk/lib/Serialization/ASTWriterStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterStmt.cpp?rev=151527&r1=151526&r2=151527&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterStmt.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterStmt.cpp Mon Feb 27 07:20:39 2012
@@ -598,6 +598,7 @@
   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.





More information about the cfe-commits mailing list