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/Frontend/AnalysisConsumer.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/Frontend/AnalysisConsumer.cpp')
-rw-r--r-- | lib/Frontend/AnalysisConsumer.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp index efea255403..87c3fca249 100644 --- a/lib/Frontend/AnalysisConsumer.cpp +++ b/lib/Frontend/AnalysisConsumer.cpp @@ -41,10 +41,6 @@ using namespace clang; static ExplodedNode::Auditor* CreateUbiViz(); //===----------------------------------------------------------------------===// -// Basic type definitions. -//===----------------------------------------------------------------------===// - -//===----------------------------------------------------------------------===// // Special PathDiagnosticClients. //===----------------------------------------------------------------------===// @@ -276,7 +272,8 @@ static void FindBlocks(DeclContext *D, llvm::SmallVectorImpl<Decl*> &WL) { void AnalysisConsumer::HandleCode(Decl *D, Stmt* Body, Actions& actions) { // Don't run the actions if an error has occured with parsing the file. - if (PP.getDiagnostics().hasErrorOccurred()) + Diagnostic &Diags = PP.getDiagnostics(); + if (Diags.hasErrorOccurred() || Diags.hasFatalErrorOccurred()) return; // Don't run the actions on declarations in header files unless |