diff options
-rw-r--r-- | tools/libclang/CIndex.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 6f001d5381..50d56fccb9 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -4142,6 +4142,10 @@ CXCursor clang_getCanonicalCursor(CXCursor C) { 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)); |