diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-04-30 21:49:25 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-04-30 21:49:25 +0000 |
commit | 99e8192c4c8f1f596f9969e5f2cdafcee64ddaac (patch) | |
tree | 7fad4ee6d5f864d1192984a56b723cc0f8e36370 /lib/Sema/AnalysisBasedWarnings.cpp | |
parent | c0c8300329718b45df259c49310d3c2b377a6e0f (diff) |
Don't perform AnalysisBasedWarnings in Sema or run the static analyzer when a
fatal error has occurred.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/AnalysisBasedWarnings.cpp')
-rw-r--r-- | lib/Sema/AnalysisBasedWarnings.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp index dffdf6b445..6ded0a3460 100644 --- a/lib/Sema/AnalysisBasedWarnings.cpp +++ b/lib/Sema/AnalysisBasedWarnings.cpp @@ -345,12 +345,14 @@ AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P, // don't bother trying. // (2) The code already has problems; running the analysis just takes more // time. - if (S.getDiagnostics().hasErrorOccurred()) + Diagnostic &Diags = S.getDiagnostics(); + + if (Diags.hasErrorOccurred() || Diags.hasFatalErrorOccurred()) return; // Do not do any analysis for declarations in system headers if we are // going to just ignore them. - if (S.getDiagnostics().getSuppressSystemWarnings() && + if (Diags.getSuppressSystemWarnings() && S.SourceMgr.isInSystemHeader(D->getLocation())) return; |