diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-07 18:34:24 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-07 18:34:24 +0000 |
commit | 4ba3b297e68035fd980f527d3d2cd0e36e63aec7 (patch) | |
tree | e8c6e7c6085743ecd2475f7e779c862bc67b1372 /clang/tools/c-index-test/c-index-test.c | |
parent | acc83d10bd1f0f061b3f48e9bfb2eb8c28be6b84 (diff) | |
download | bcm5719-llvm-4ba3b297e68035fd980f527d3d2cd0e36e63aec7.tar.gz bcm5719-llvm-4ba3b297e68035fd980f527d3d2cd0e36e63aec7.zip |
Fix some build warnings.
llvm-svn: 86393
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 7 |
1 files changed, 5 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 429c5e52dce..82653357b10 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -161,10 +161,11 @@ clang_getCompletionChunkKindSpelling(enum CXCompletionChunkKind Kind) { void print_completion_result(CXCompletionResult *completion_result, CXClientData client_data) { FILE *file = (FILE *)client_data; + int I, N; fprintf(file, "%s:", clang_getCursorKindSpelling(completion_result->CursorKind)); - int I, N = clang_getNumCompletionChunks(completion_result->CompletionString); + N = clang_getNumCompletionChunks(completion_result->CompletionString); for (I = 0; I != N; ++I) { const char *text = clang_getCompletionChunkText(completion_result->CompletionString, I); @@ -183,11 +184,13 @@ void perform_code_completion(int argc, const char **argv) { char *filename = 0; unsigned line; unsigned column; + CXIndex CIdx; + input += strlen("-code-completion-at="); if (parse_file_line_column(input, &filename, &line, &column)) return; - CXIndex CIdx = clang_createIndex(0, 0); + CIdx = clang_createIndex(0, 0); clang_codeComplete(CIdx, argv[argc - 1], argc - 3, argv + 2, filename, line, column, &print_completion_result, stdout); clang_disposeIndex(CIdx); |