diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-06 17:40:26 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-06 17:40:26 +0000 |
commit | 85bea9777d444ccbcc086d98f075fe666c2e865d (patch) | |
tree | 50170f37929c257952e537f556636b97099464b3 /lib/Frontend/ASTUnit.cpp | |
parent | e855448bc8dddac24a72ba8dc7e936d31e896fe4 (diff) |
Keep track of when "unrecoverable" errors occur, then allow
clang_saveTranslationUnit() to save a PCH file if the only errors it
contains are recoverable errors. Fixes <rdar://problem/9727804>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 8f61d6a8c2..4407d2d3e2 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -2288,7 +2288,7 @@ void ASTUnit::CodeComplete(llvm::StringRef File, unsigned Line, unsigned Column, } CXSaveError ASTUnit::Save(llvm::StringRef File) { - if (getDiagnostics().hasErrorOccurred()) + if (getDiagnostics().hasUnrecoverableErrorOccurred()) return CXSaveError_TranslationErrors; // FIXME: Can we somehow regenerate the stat cache here, or do we need to |