From 02b319ce18c31666beec2df69c47c5863af80a1d Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 19 Oct 2009 22:15:09 +0000 Subject: Really fix by adding a 'displayDiagnostics' option to clang_createTranslationUnit() and clang_createTranslationUnitFromSourceFile(). The user can now specify if the diagnostics from Clang are printed to stderr or are silenced completely. We can obviously evolve this API to be more general in the future. Note: Added a FIXME since I wasn't certain what was the best way to redirect to something analogous to '/dev/null' on Windows. llvm-svn: 84548 --- clang/tools/c-index-test/c-index-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/tools/c-index-test/c-index-test.c') diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index fc84faac2bb..29cd1370e5a 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -96,7 +96,7 @@ int main(int argc, char **argv) { if (!strcmp(argv[2], "local")) clang_wantOnlyLocalDeclarations(Idx); - TU = clang_createTranslationUnit(Idx, argv[1]); + TU = clang_createTranslationUnit(Idx, argv[1], /* displayDiagnostics= */ 1); if (!TU) { fprintf(stderr, "Unable to load translation unit!\n"); -- cgit v1.2.3