} else {
IDecl->setLocation(AtInterfaceLoc);
IDecl->setForwardDecl(false);
+ IDecl->setClassLoc(ClassLoc);
}
} else {
IDecl = ObjCInterfaceDecl::Create(Context, CurContext, AtInterfaceLoc,
ObjCInterfaceDecl *IDecl = dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl);
if (!IDecl) { // Not already seen? Make a forward decl.
IDecl = ObjCInterfaceDecl::Create(Context, CurContext, AtClassLoc,
- IdentList[i], SourceLocation(), true);
+ IdentList[i],
+ // FIXME: need to get the 'real'
+ // identifier loc from the parser.
+ AtClassLoc, true);
PushOnScopeChains(IDecl, TUScope);
}
#include <string.h>
static void PrintCursor(CXCursor Cursor) {
- printf("%s => %s\n", clang_getCursorKindSpelling(Cursor.kind),
+ printf("%s => %s ", clang_getCursorKindSpelling(Cursor.kind),
clang_getCursorSpelling(Cursor));
}
{
if (!Filter || (Cursor.kind == *(enum CXCursorKind *)Filter)) {
PrintCursor(Cursor);
- printf(" Context: %s\n", clang_getDeclSpelling(Dcl));
- printf(" Source: %s (%d:%d)\n", clang_getCursorSource(Cursor),
+ printf("(Context: %s", clang_getDeclSpelling(Dcl));
+ printf(" Source: %s (%d:%d))\n", clang_getCursorSource(Cursor),
clang_getCursorLine(Cursor),
clang_getCursorColumn(Cursor));
}
{
if (!Filter || (Cursor.kind == *(enum CXCursorKind *)Filter)) {
PrintCursor(Cursor);
- printf(" Context: %s\n", clang_getTranslationUnitSpelling(Unit));
- printf(" Source: %s (%d:%d)\n", clang_getCursorSource(Cursor),
+ printf("(Context: %s", clang_getTranslationUnitSpelling(Unit));
+ printf(" Source: %s (%d:%d))\n", clang_getCursorSource(Cursor),
clang_getCursorLine(Cursor),
clang_getCursorColumn(Cursor));