const char *clang_getDeclSpelling(CXDecl);
unsigned clang_getDeclLine(CXDecl);
unsigned clang_getDeclColumn(CXDecl);
+const char *clang_getDeclSource(CXDecl);
/*
* CXCursor Operations.
return SourceMgr.getSpellingLineNumber(ND->getLocation());
}
+const char *clang_getDeclSource(CXDecl AnonDecl)
+{
+ assert(AnonDecl && "Passed null CXDecl");
+ NamedDecl *ND = static_cast<NamedDecl *>(AnonDecl);
+ SourceManager &SourceMgr = ND->getASTContext().getSourceManager();
+ return SourceMgr.getBufferName(ND->getLocation());
+}
+
const char *clang_getCursorSpelling(CXCursor C)
{
assert(C.decl && "CXCursor has null decl");
_clang_getDeclSpelling
_clang_getDeclLine
_clang_getDeclColumn
+_clang_getDeclSource
_clang_getEntity
_clang_getEntityFromDecl
_clang_getURI