aboutsummaryrefslogtreecommitdiff
path: root/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-08 04:11:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-08 04:11:32 +0000
commit4dc99f8928f0d21b15edccb03dbc9492a1ba87f7 (patch)
tree6d58bc295adcc9bdffde741abe37e25133f5c224 /tools/c-index-test/c-index-test.c
parentbc20ef3150556718b33f2a9da78c204f1bb89548 (diff)
CIndex: Add temporary hack to leak memory instead of returning invalid pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/c-index-test/c-index-test.c')
-rw-r--r--tools/c-index-test/c-index-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index 82653357b1..cc4080e388 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <assert.h>
#ifdef _MSC_VER
char *basename(const char* path)
@@ -86,7 +87,7 @@ static void TranslationUnitVisitor(CXTranslationUnit Unit, CXCursor Cursor,
printf("// CHECK: %s:%d:%d: ", basename(clang_getCursorSource(Ref)),
curLine, curColumn);
PrintCursor(Ref);
- printf(" [Context:%s]\n", clang_getDeclSpelling(Ref.decl));
+ printf(" [Context:%s]\n", clang_getDeclSpelling(Ref.decl));
}
startBuf++;
}