[cfe-commits] r135316 - /cfe/trunk/tools/libclang/CIndex.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Fri Jul 15 15:37:58 PDT 2011


Author: akirtzidis
Date: Fri Jul 15 17:37:58 2011
New Revision: 135316

URL: http://llvm.org/viewvc/llvm-project?rev=135316&view=rev
Log:
[libclang] Map canonical decl of a category implementation to the category decl.

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

Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=135316&r1=135315&r2=135316&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Fri Jul 15 17:37:58 2011
@@ -4142,6 +4142,10 @@
     return C;
   
   if (Decl *D = getCursorDecl(C)) {
+    if (ObjCCategoryImplDecl *CatImplD = dyn_cast<ObjCCategoryImplDecl>(D))
+      if (ObjCCategoryDecl *CatD = CatImplD->getCategoryDecl())
+        return MakeCXCursor(CatD, getCursorTU(C));
+
     if (ObjCImplDecl *ImplD = dyn_cast<ObjCImplDecl>(D))
       if (ObjCInterfaceDecl *IFD = ImplD->getClassInterface())
         return MakeCXCursor(IFD, getCursorTU(C));





More information about the cfe-commits mailing list