diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-05 18:10:21 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-05 18:10:21 +0000 |
commit | a2433154c890418ebd854e2272af6db974db608c (patch) | |
tree | 3a3d4d6bad76d862f2b680fcc956b596a1a2145b /clang/tools/CIndex/CIndex.cpp | |
parent | 6e39c4a09784b2cdd4190de5d65429a9bcb0e597 (diff) | |
download | bcm5719-llvm-a2433154c890418ebd854e2272af6db974db608c.tar.gz bcm5719-llvm-a2433154c890418ebd854e2272af6db974db608c.zip |
Minor ASTUnit cleanups:
- Rename "Diagnostics" and related to "StoredDiagnostics", to better
capture what we're actually storing.
- Move SourceManager and FileManager to the heap.
llvm-svn: 100441
Diffstat (limited to 'clang/tools/CIndex/CIndex.cpp')
-rw-r--r-- | clang/tools/CIndex/CIndex.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 2d9b2cb3763..9db5ba79cef 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp @@ -1064,8 +1064,8 @@ clang_createTranslationUnitFromSourceFile(CXIndex CIdx, if (NumErrors != Diags->getNumErrors()) { // Make sure to check that 'Unit' is non-NULL. if (CXXIdx->getDisplayDiagnostics() && Unit.get()) { - for (ASTUnit::diag_iterator D = Unit->diag_begin(), - DEnd = Unit->diag_end(); + for (ASTUnit::stored_diag_iterator D = Unit->stored_diag_begin(), + DEnd = Unit->stored_diag_end(); D != DEnd; ++D) { CXStoredDiagnostic Diag(*D, Unit->getASTContext().getLangOptions()); CXString Msg = clang_formatDiagnostic(&Diag, @@ -1179,7 +1179,7 @@ clang_createTranslationUnitFromSourceFile(CXIndex CIdx, num_unsaved_files, unsaved_files, ATU->getFileManager(), ATU->getSourceManager(), - ATU->getDiagnostics()); + ATU->getStoredDiagnostics()); } else if (CXXIdx->getDisplayDiagnostics()) { // We failed to load the ASTUnit, but we can still deserialize the // diagnostics and emit them. |