[cfe-commits] r101193 - in /cfe/trunk: include/clang-c/Index.h tools/CIndex/CIndex.cpp tools/CIndex/CXCursor.cpp
Ted Kremenek
kremenek at apple.com
Tue Apr 13 16:39:06 PDT 2010
Author: kremenek
Date: Tue Apr 13 18:39:06 2010
New Revision: 101193
URL: http://llvm.org/viewvc/llvm-project?rev=101193&view=rev
Log:
Add cursor kind for C++ methods.
Modified:
cfe/trunk/include/clang-c/Index.h
cfe/trunk/tools/CIndex/CIndex.cpp
cfe/trunk/tools/CIndex/CXCursor.cpp
Modified: cfe/trunk/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=101193&r1=101192&r2=101193&view=diff
==============================================================================
--- cfe/trunk/include/clang-c/Index.h (original)
+++ cfe/trunk/include/clang-c/Index.h Tue Apr 13 18:39:06 2010
@@ -700,7 +700,11 @@
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 */
Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=101193&r1=101192&r2=101193&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Tue Apr 13 18:39:06 2010
@@ -1558,6 +1558,8 @@
return createCXString("ObjCImplementationDecl");
case CXCursor_ObjCCategoryImplDecl:
return createCXString("ObjCCategoryImplDecl");
+ case CXCursor_CXXMethod:
+ return createCXString("CXXMethod");
case CXCursor_UnexposedDecl:
return createCXString("UnexposedDecl");
case CXCursor_ObjCSuperClassRef:
Modified: cfe/trunk/tools/CIndex/CXCursor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CXCursor.cpp?rev=101193&r1=101192&r2=101193&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CXCursor.cpp (original)
+++ cfe/trunk/tools/CIndex/CXCursor.cpp Tue Apr 13 18:39:06 2010
@@ -50,6 +50,7 @@
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;
More information about the cfe-commits
mailing list