Keep track in chained PCH of implicit members that were added after the definition was completed.
llvm-svn: 117240
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index f3715143..0e70053 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -364,12 +364,11 @@
}
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);
+ // Notify that an implicit member was added after the definition
+ // was completed.
+ if (!isBeingDefined())
+ if (ASTMutationListener *L = getASTMutationListener())
+ L->AddedCXXImplicitMember(data().Definition, D);
if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
// If this is the implicit default constructor, note that we have now