summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-19 22:15:09 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-19 22:15:09 +0000
commit02b319ce18c31666beec2df69c47c5863af80a1d (patch)
treed22305514337b542186fb849431b7536634ceaa5 /clang/tools/c-index-test/c-index-test.c
parent168ad6985ee1245071922f8afa5d8216be260918 (diff)
downloadbcm5719-llvm-02b319ce18c31666beec2df69c47c5863af80a1d.tar.gz
bcm5719-llvm-02b319ce18c31666beec2df69c47c5863af80a1d.zip
Really fix <rdar://problem/7312058> 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
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r--clang/tools/c-index-test/c-index-test.c2
1 files changed, 1 insertions, 1 deletions
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");
OpenPOWER on IntegriCloud