Move CXCursor_FirstDecl definition later to make the results more readable in the debugger.

llvm-svn: 104171
This commit is contained in:
Ted Kremenek 2010-05-19 21:51:10 +00:00
parent d754848f10
commit 08de5c1418
2 changed files with 6 additions and 5 deletions

View File

@ -648,7 +648,6 @@ CINDEX_LINKAGE void clang_disposeTranslationUnit(CXTranslationUnit);
*/
enum CXCursorKind {
/* Declarations */
CXCursor_FirstDecl = 1,
/**
* \brief A declaration whose specific kind is not exposed via this
* interface.
@ -707,6 +706,7 @@ enum CXCursorKind {
/** \brief A linkage specification, e.g. 'extern "C"'. */
CXCursor_LinkageSpec = 23,
CXCursor_FirstDecl = CXCursor_UnexposedDecl,
CXCursor_LastDecl = CXCursor_LinkageSpec,
/* References */

View File

@ -1585,10 +1585,11 @@ static CXString getDeclSpelling(Decl *D) {
// 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) {