Author: kremenek Date: Wed May 19 16:51:10 2010 New Revision: 104171 URL: http://llvm.org/viewvc/llvm-project?rev=104171&view=rev Log: Move CXCursor_FirstDecl definition later to make the results more readable in the debugger.
Modified: cfe/trunk/include/clang-c/Index.h cfe/trunk/tools/libclang/CIndex.cpp Modified: cfe/trunk/include/clang-c/Index.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=104171&r1=104170&r2=104171&view=diff ============================================================================== --- cfe/trunk/include/clang-c/Index.h (original) +++ cfe/trunk/include/clang-c/Index.h Wed May 19 16:51:10 2010 @@ -648,7 +648,6 @@ */ enum CXCursorKind { /* Declarations */ - CXCursor_FirstDecl = 1, /** * \brief A declaration whose specific kind is not exposed via this * interface. @@ -707,6 +706,7 @@ /** \brief A linkage specification, e.g. 'extern "C"'. */ CXCursor_LinkageSpec = 23, + CXCursor_FirstDecl = CXCursor_UnexposedDecl, CXCursor_LastDecl = CXCursor_LinkageSpec, /* References */ Modified: cfe/trunk/tools/libclang/CIndex.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=104171&r1=104170&r2=104171&view=diff ============================================================================== --- cfe/trunk/tools/libclang/CIndex.cpp (original) +++ cfe/trunk/tools/libclang/CIndex.cpp Wed May 19 16:51:10 2010 @@ -1585,10 +1585,11 @@ // ObjCCategoryImplDecl returns the category name. return createCXString(CIMP->getIdentifier()->getNameStart()); - if (ND->getIdentifier()) - return createCXString(ND->getIdentifier()->getNameStart()); - - return createCXString(""); + llvm::SmallString<1024> S; + llvm::raw_svector_ostream os(S); + ND->printName(os); + + return createCXString(os.str()); } CXString clang_getCursorSpelling(CXCursor C) { _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits