diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-11-11 00:39:14 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-11-11 00:39:14 +0000 |
| commit | 44c6ee77293ac396b3f4737951e4fd44834b85e9 (patch) | |
| tree | 5d86b8b57286f6f894b0b6920a6d26c6a6578d35 /clang/tools/libclang/CIndex.cpp | |
| parent | 8bf3d832e5044bace8722894f691ff6badc95d61 (diff) | |
| download | bcm5719-llvm-44c6ee77293ac396b3f4737951e4fd44834b85e9.tar.gz bcm5719-llvm-44c6ee77293ac396b3f4737951e4fd44834b85e9.zip | |
Improve ASTUnit's capture of diagnostics so that the
diagnostic-capturing client lives as long as the ASTUnit itself
does. Otherwise, we can end up with crashes when we get a diagnostic
outside of parsing/code completion. The circumstances under which this
happen are really hard to reproduce, because a file needs to change
from under us.
llvm-svn: 118751
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 30e903449fd..8de774cb887 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -2186,9 +2186,9 @@ static void clang_parseTranslationUnit_Impl(void *UserData) { Diags, CXXIdx->getClangResourcesPath(), CXXIdx->getOnlyLocalDecls(), + /*CaptureDiagnostics=*/true, RemappedFiles.data(), RemappedFiles.size(), - /*CaptureDiagnostics=*/true, PrecompilePreamble, CompleteTranslationUnit, CacheCodeCompetionResults, |

