diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-09 17:05:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-09 17:05:28 +0000 |
commit | f81f528db1598da40ce361a35bc0e17885cd4d4a (patch) | |
tree | 97bd2bea63810abc85f5b2dac9569a5589e5445c /clang/tools/c-index-test/c-index-test.c | |
parent | 348881949566da733662f18b9cd3888581677b69 (diff) | |
download | bcm5719-llvm-f81f528db1598da40ce361a35bc0e17885cd4d4a.tar.gz bcm5719-llvm-f81f528db1598da40ce361a35bc0e17885cd4d4a.zip |
C doesn't allow mixing declarations and statements, silly
llvm-svn: 86556
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 0df590d8499..fa6fc56fba5 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/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 : ""); |