From: Argyrios Kyrtzidis Date: Fri, 10 Feb 2012 20:10:36 +0000 (+0000) Subject: Update MultiplexASTMutationListener with the missing methods from ASTMutationListener. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1da95dbf2a341faec43439802b23a4f847baa6ad;p=clang Update MultiplexASTMutationListener with the missing methods from ASTMutationListener. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150265 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/ASTMutationListener.h b/include/clang/AST/ASTMutationListener.h index a5d3d9c936..cb038a0a58 100644 --- a/include/clang/AST/ASTMutationListener.h +++ b/include/clang/AST/ASTMutationListener.h @@ -74,6 +74,9 @@ public: virtual void AddedObjCPropertyInClassExtension(const ObjCPropertyDecl *Prop, const ObjCPropertyDecl *OrigProp, const ObjCCategoryDecl *ClassExt) {} + + // NOTE: If new methods are added they should also be added to + // MultiplexASTMutationListener. }; } // end namespace clang diff --git a/lib/Frontend/MultiplexConsumer.cpp b/lib/Frontend/MultiplexConsumer.cpp index f57b16b824..6784254cd5 100644 --- a/lib/Frontend/MultiplexConsumer.cpp +++ b/lib/Frontend/MultiplexConsumer.cpp @@ -99,6 +99,11 @@ public: const FunctionDecl *D); virtual void CompletedImplicitDefinition(const FunctionDecl *D); virtual void StaticDataMemberInstantiated(const VarDecl *D); + virtual void AddedObjCCategoryToInterface(const ObjCCategoryDecl *CatD, + const ObjCInterfaceDecl *IFD); + virtual void AddedObjCPropertyInClassExtension(const ObjCPropertyDecl *Prop, + const ObjCPropertyDecl *OrigProp, + const ObjCCategoryDecl *ClassExt); private: std::vector Listeners; }; @@ -144,6 +149,19 @@ void MultiplexASTMutationListener::StaticDataMemberInstantiated( for (size_t i = 0, e = Listeners.size(); i != e; ++i) Listeners[i]->StaticDataMemberInstantiated(D); } +void MultiplexASTMutationListener::AddedObjCCategoryToInterface( + const ObjCCategoryDecl *CatD, + const ObjCInterfaceDecl *IFD) { + for (size_t i = 0, e = Listeners.size(); i != e; ++i) + Listeners[i]->AddedObjCCategoryToInterface(CatD, IFD); +} +void MultiplexASTMutationListener::AddedObjCPropertyInClassExtension( + const ObjCPropertyDecl *Prop, + const ObjCPropertyDecl *OrigProp, + const ObjCCategoryDecl *ClassExt) { + for (size_t i = 0, e = Listeners.size(); i != e; ++i) + Listeners[i]->AddedObjCPropertyInClassExtension(Prop, OrigProp, ClassExt); +} } // end namespace clang