]> granicus.if.org Git - clang/commitdiff
When implicit members are added to a C++ record, notify the serializer so that a...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 20 Oct 2010 23:48:42 +0000 (23:48 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 20 Oct 2010 23:48:42 +0000 (23:48 +0000)
Thanks to Doug for the hint!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116975 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclCXX.cpp

index 19caae5b7f2b37b12289a98041e364623afcd58e..78b15ffed9dd617cbcb1dae20cb9d5fd751077f1 100644 (file)
@@ -363,6 +363,13 @@ void CXXRecordDecl::addedMember(Decl *D) {
   }
   
   if (D->isImplicit()) {
+    // Notify the serializer that an implicit member changed the definition.
+    // A chained PCH will write the whole definition again.
+    // FIXME: Make a notification about the specific change (through a listener
+    // interface) so the changes that the serializer records are more
+    // fine grained.
+    data().Definition->setChangedSinceDeserialization(true);
+
     if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
       // If this is the implicit default constructor, note that we have now
       // declared it.