diff options
-rw-r--r-- | include/clang-c/Index.h | 6 | ||||
-rw-r--r-- | tools/CIndex/CIndex.cpp | 2 | ||||
-rw-r--r-- | tools/CIndex/CXCursor.cpp | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 0ea5f2cff5..8cc538283e 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -700,7 +700,11 @@ enum CXCursorKind { CXCursor_ObjCCategoryImplDecl = 19, /** \brief A typedef */ CXCursor_TypedefDecl = 20, - CXCursor_LastDecl = 20, + + /** \brief A C++ class method. */ + CXCursor_CXXMethod = 21, + + CXCursor_LastDecl = 21, /* References */ CXCursor_FirstRef = 40, /* Decl references */ diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp index 43aa34f4cf..10c399591b 100644 --- a/tools/CIndex/CIndex.cpp +++ b/tools/CIndex/CIndex.cpp @@ -1558,6 +1558,8 @@ CXString clang_getCursorKindSpelling(enum CXCursorKind Kind) { return createCXString("ObjCImplementationDecl"); case CXCursor_ObjCCategoryImplDecl: return createCXString("ObjCCategoryImplDecl"); + case CXCursor_CXXMethod: + return createCXString("CXXMethod"); case CXCursor_UnexposedDecl: return createCXString("UnexposedDecl"); case CXCursor_ObjCSuperClassRef: diff --git a/tools/CIndex/CXCursor.cpp b/tools/CIndex/CXCursor.cpp index cbf9d7e6f9..036214e75f 100644 --- a/tools/CIndex/CXCursor.cpp +++ b/tools/CIndex/CXCursor.cpp @@ -50,6 +50,7 @@ static CXCursorKind GetCursorKind(Decl *D) { case Decl::ObjCMethod: return cast<ObjCMethodDecl>(D)->isInstanceMethod() ? CXCursor_ObjCInstanceMethodDecl : CXCursor_ObjCClassMethodDecl; + case Decl::CXXMethod: return CXCursor_CXXMethod; case Decl::ObjCProperty: return CXCursor_ObjCPropertyDecl; case Decl::ObjCProtocol: return CXCursor_ObjCProtocolDecl; case Decl::ParmVar: return CXCursor_ParmDecl; |