]> granicus.if.org Git - clang/commitdiff
Flush statements after writing each DECL_CXX_BASE_SPECIFIERS node
authorDouglas Gregor <dgregor@apple.com>
Sat, 30 Oct 2010 04:28:16 +0000 (04:28 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 30 Oct 2010 04:28:16 +0000 (04:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117770 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTWriter.cpp
lib/Serialization/ASTWriterDecl.cpp

index 1fec22be4ed85bc9882f96877634354aba2854fc..47ef72f7bd64a26c1535243dcf1742da71f0a396 100644 (file)
@@ -3208,6 +3208,9 @@ void ASTWriter::FlushCXXBaseSpecifiers() {
     for (; B != BEnd; ++B)
       AddCXXBaseSpecifier(*B, Record);
     Stream.EmitRecord(serialization::DECL_CXX_BASE_SPECIFIERS, Record);
+    
+    // Flush any expressions that were written as part of the base specifiers.
+    FlushStmts();
   }
 
   CXXBaseSpecifiersToWrite.clear();
index 7d80f31856666058ec8c8e5b0a5906f95ec04884..de58cd03a432bfc8df4e8a98c3202d76d442aed2 100644 (file)
@@ -1186,9 +1186,6 @@ void ASTWriter::WriteDecl(ASTContext &Context, Decl *D) {
   // Flush C++ base specifiers, if there are any.
   FlushCXXBaseSpecifiers();
   
-  // Flush any expressions that were written as part of the base specifiers.
-  FlushStmts();
-
   // Note "external" declarations so that we can add them to a record in the
   // AST file later.
   //