Make sure ObjCInterfaceDecl's that are forward declared always contain a valid location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81487 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index 6db4898..101d712 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -5,7 +5,7 @@
#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));
}
@@ -13,8 +13,8 @@
{
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));
}
@@ -24,8 +24,8 @@
{
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));