aboutsummaryrefslogtreecommitdiff
path: root/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-09 17:05:28 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-09 17:05:28 +0000
commitd5a2089663d81faee0de031deabc418fa53ecf3b (patch)
tree6358c3dab65adfac57700545e814544c70e57209 /tools/c-index-test/c-index-test.c
parent4bb2c284f5bfd34fe9c03050059349f8f43c5620 (diff)
C doesn't allow mixing declarations and statements, silly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86556 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index 0df590d849..fa6fc56fba 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -163,6 +163,7 @@ void print_completion_string(CXCompletionString completion_string, FILE *file) {
N = clang_getNumCompletionChunks(completion_string);
for (I = 0; I != N; ++I) {
+ const char *text = 0;
enum CXCompletionChunkKind Kind
= clang_getCompletionChunkKind(completion_string, I);
@@ -175,8 +176,7 @@ void print_completion_string(CXCompletionString completion_string, FILE *file) {
continue;
}
- const char *text
- = clang_getCompletionChunkText(completion_string, I);
+ text = clang_getCompletionChunkText(completion_string, I);
fprintf(file, "{%s %s}",
clang_getCompletionChunkKindSpelling(Kind),
text? text : "");