diff options
author | Steve Naroff <snaroff@apple.com> | 2009-10-20 14:46:24 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-10-20 14:46:24 +0000 |
commit | 531e2840642e0a4099d537300c512d41f5c044a9 (patch) | |
tree | cf654e800bbf7201f525c6eb0c64d1932a369421 /clang/tools/c-index-test/c-index-test.c | |
parent | 3301207a15e460c346bbaa472ab933c725319225 (diff) | |
download | bcm5719-llvm-531e2840642e0a4099d537300c512d41f5c044a9.tar.gz bcm5719-llvm-531e2840642e0a4099d537300c512d41f5c044a9.zip |
- Extend clang_createIndex() to support PCH and diagnostic 'filtering'. This seems cleaner to me without sacrificing much flexibility.
- Remove clang_wantOnlyLocalDeclarations().
- Remove 'displayDiagnostics' arguments to clang_createTranslationUnitFromSourceFile() and clang_createTranslationUnit().
- Have clang_createTranslationUnitFromSourceFile() strip the '-o <outfile>' command line arguments if they exist. Document this semantic in the header. Also verify we have a valid ASTUnit before telling it to 'unlinkTemporaryFile()'.
llvm-svn: 84634
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 29cd1370e5a..83d3d3f3138 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -91,12 +91,10 @@ int main(int argc, char **argv) { CXTranslationUnit TU; enum CXCursorKind K = CXCursor_NotImplemented; - Idx = clang_createIndex(); + Idx = clang_createIndex(/* excludeDeclsFromPCH */ !strcmp(argv[2], "local") ? 1 : 0, + /* displayDiagnostics */ 1); - if (!strcmp(argv[2], "local")) - clang_wantOnlyLocalDeclarations(Idx); - - TU = clang_createTranslationUnit(Idx, argv[1], /* displayDiagnostics= */ 1); + TU = clang_createTranslationUnit(Idx, argv[1]); if (!TU) { fprintf(stderr, "Unable to load translation unit!\n"); |