summaryrefslogtreecommitdiffstats
path: root/clang/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
commita797946755880233297f19fa341b9f34c53f1969 (patch)
tree79651347fa0413d1455eb1d7f93aa2e626a9ed8f /clang/tools/c-index-test/c-index-test.c
parent80ec848944b8512f2983a8be145d0b343adf28b4 (diff)
downloadbcm5719-llvm-a797946755880233297f19fa341b9f34c53f1969.tar.gz
bcm5719-llvm-a797946755880233297f19fa341b9f34c53f1969.zip
CIndex: Add temporary hack to leak memory instead of returning invalid pointers.
llvm-svn: 86438
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r--clang/tools/c-index-test/c-index-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 82653357b10..cc4080e388b 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/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++;
}
OpenPOWER on IntegriCloud