From ab238a7d1895201ad3d10fc961ca68105b3844fb Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Sun, 24 Apr 2011 16:28:06 +0000 Subject: Synthesizing the definition of an implicit member is an AST modification, so notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug. llvm-svn: 130103 --- clang/lib/Frontend/MultiplexConsumer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/lib/Frontend') diff --git a/clang/lib/Frontend/MultiplexConsumer.cpp b/clang/lib/Frontend/MultiplexConsumer.cpp index ecad91f1f04..721bd05a98a 100644 --- a/clang/lib/Frontend/MultiplexConsumer.cpp +++ b/clang/lib/Frontend/MultiplexConsumer.cpp @@ -97,6 +97,7 @@ public: const ClassTemplateSpecializationDecl *D); virtual void AddedCXXTemplateSpecialization(const FunctionTemplateDecl *TD, const FunctionDecl *D); + virtual void CompletedImplicitDefinition(const FunctionDecl *D); private: std::vector Listeners; }; @@ -132,6 +133,11 @@ void MultiplexASTMutationListener::AddedCXXTemplateSpecialization( for (size_t i = 0, e = Listeners.size(); i != e; ++i) Listeners[i]->AddedCXXTemplateSpecialization(TD, D); } +void MultiplexASTMutationListener::CompletedImplicitDefinition( + const FunctionDecl *D) { + for (size_t i = 0, e = Listeners.size(); i != e; ++i) + Listeners[i]->CompletedImplicitDefinition(D); +} } // end namespace clang -- cgit v1.2.3