[cfe-commits] r89055 - /cfe/trunk/tools/CIndex/CIndex.cpp

Ted Kremenek kremenek at apple.com
Mon Nov 16 23:02:16 PST 2009


Author: kremenek
Date: Tue Nov 17 01:02:15 2009
New Revision: 89055

URL: http://llvm.org/viewvc/llvm-project?rev=89055&view=rev
Log:
Sort visitor methods.  No functionality change.

Modified:
    cfe/trunk/tools/CIndex/CIndex.cpp

Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=89055&r1=89054&r2=89055&view=diff

==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Tue Nov 17 01:02:15 2009
@@ -141,8 +141,25 @@
            I = DC->decls_begin(), E = DC->decls_end(); I != E; ++I)
       Visit(*I);
   }
-  void VisitTypedefDecl(TypedefDecl *ND) { 
-    Call(CXCursor_TypedefDecl, ND); 
+
+  void VisitFunctionDecl(FunctionDecl *ND) {
+    Call(ND->isThisDeclarationADefinition() ? CXCursor_FunctionDefn
+                                            : CXCursor_FunctionDecl, ND);
+  }
+  void VisitObjCCategoryDecl(ObjCCategoryDecl *ND) {
+    Call(CXCursor_ObjCCategoryDecl, ND);
+  }
+  void VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *ND) {
+    Call(CXCursor_ObjCCategoryDefn, ND);
+  }
+  void VisitObjCImplementationDecl(ObjCImplementationDecl *ND) {
+    Call(CXCursor_ObjCClassDefn, ND);
+  }
+  void VisitObjCInterfaceDecl(ObjCInterfaceDecl *ND) {
+    Call(CXCursor_ObjCInterfaceDecl, ND);
+  }  
+  void VisitObjCProtocolDecl(ObjCProtocolDecl *ND) {
+    Call(CXCursor_ObjCProtocolDecl, ND);
   }
   void VisitTagDecl(TagDecl *ND) {
     switch (ND->getTagKind()) {
@@ -160,29 +177,14 @@
         break;
     }
   }
+  void VisitTypedefDecl(TypedefDecl *ND) { 
+    Call(CXCursor_TypedefDecl, ND); 
+  }  
   void VisitVarDecl(VarDecl *ND) {
     Call(CXCursor_VarDecl, ND);
-  }
-  void VisitFunctionDecl(FunctionDecl *ND) {
-    Call(ND->isThisDeclarationADefinition() ? CXCursor_FunctionDefn
-                                            : CXCursor_FunctionDecl, ND);
-  }
-  void VisitObjCInterfaceDecl(ObjCInterfaceDecl *ND) {
-    Call(CXCursor_ObjCInterfaceDecl, ND);
-  }
-  void VisitObjCCategoryDecl(ObjCCategoryDecl *ND) {
-    Call(CXCursor_ObjCCategoryDecl, ND);
-  }
-  void VisitObjCProtocolDecl(ObjCProtocolDecl *ND) {
-    Call(CXCursor_ObjCProtocolDecl, ND);
-  }
-  void VisitObjCImplementationDecl(ObjCImplementationDecl *ND) {
-    Call(CXCursor_ObjCClassDefn, ND);
-  }
-  void VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *ND) {
-    Call(CXCursor_ObjCCategoryDefn, ND);
-  }
+  }  
 };
+  
 
 // Declaration visitor.
 class CDeclVisitor : public DeclVisitor<CDeclVisitor> {





More information about the cfe-commits mailing list