]> granicus.if.org Git - clang/commitdiff
Update MultiplexASTMutationListener with the missing methods from ASTMutationListener.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 10 Feb 2012 20:10:36 +0000 (20:10 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 10 Feb 2012 20:10:36 +0000 (20:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150265 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ASTMutationListener.h
lib/Frontend/MultiplexConsumer.cpp

index a5d3d9c93647116802632f5d8e266eff643b129d..cb038a0a582610bba53f62a5fdb21162ef075905 100644 (file)
@@ -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
index f57b16b82473871b2f23462ffdfb22a92f769a9d..6784254cd5a14b16b0748a8aedfa24c490e4d82f 100644 (file)
@@ -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<ASTMutationListener*> 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