diff options
Diffstat (limited to 'tools/c-index-test/c-index-test.c')
-rw-r--r-- | tools/c-index-test/c-index-test.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c index 39c3446f04..d4bc008369 100644 --- a/tools/c-index-test/c-index-test.c +++ b/tools/c-index-test/c-index-test.c @@ -411,8 +411,7 @@ int perform_test_load_tu(const char *file, const char *filter, CXIndex Idx; CXTranslationUnit TU; Idx = clang_createIndex(/* excludeDeclsFromPCH */ - !strcmp(filter, "local") ? 1 : 0, - /* displayDiagnostics */ 1); + !strcmp(filter, "local") ? 1 : 0); if (!CreateTranslationUnit(Idx, file, &TU)) return 1; @@ -432,8 +431,7 @@ int perform_test_load_source(int argc, const char **argv, int result; Idx = clang_createIndex(/* excludeDeclsFromPCH */ - !strcmp(filter, "local") ? 1 : 0, - /* displayDiagnostics */ 1); + !strcmp(filter, "local") ? 1 : 0); if (UseExternalASTs && strlen(UseExternalASTs)) clang_setUseExternalASTGeneration(Idx, 1); @@ -487,8 +485,7 @@ static int perform_file_scan(const char *ast_file, const char *source_file, unsigned start_line, start_col, last_line, last_col; size_t i; - if (!(Idx = clang_createIndex(/* excludeDeclsFromPCH */ 1, - /* displayDiagnostics */ 1))) { + if (!(Idx = clang_createIndex(/* excludeDeclsFromPCH */ 1))) { fprintf(stderr, "Could not create Index\n"); return 1; } @@ -700,12 +697,14 @@ int perform_code_completion(int argc, const char **argv) { if (parse_remapped_files(argc, argv, 2, &unsaved_files, &num_unsaved_files)) return -1; - CIdx = clang_createIndex(0, 0); + CIdx = clang_createIndex(0); results = clang_codeComplete(CIdx, argv[argc - 1], argc - num_unsaved_files - 3, argv + num_unsaved_files + 2, num_unsaved_files, unsaved_files, - filename, line, column); + filename, line, column, + PrintDiagnosticCallback, stderr); + if (results) { unsigned i, n = results->NumResults; for (i = 0; i != n; ++i) @@ -757,7 +756,7 @@ int inspect_cursor_at(int argc, const char **argv) { &num_unsaved_files)) return -1; - CIdx = clang_createIndex(0, 1); + CIdx = clang_createIndex(0); TU = clang_createTranslationUnitFromSourceFile(CIdx, argv[argc - 1], argc - num_unsaved_files - 2 - NumLocations, argv + num_unsaved_files + 1 + NumLocations, @@ -816,7 +815,7 @@ int perform_token_annotation(int argc, const char **argv) { if (parse_remapped_files(argc, argv, 2, &unsaved_files, &num_unsaved_files)) return -1; - CIdx = clang_createIndex(0, 0); + CIdx = clang_createIndex(0); TU = clang_createTranslationUnitFromSourceFile(CIdx, argv[argc - 1], argc - num_unsaved_files - 3, argv + num_unsaved_files + 2, |