From: Ted Kremenek Date: Thu, 14 Feb 2008 22:54:17 +0000 (+0000) Subject: Don't analyze functions when we have parse errors. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=546bded9ba9676e7ddae45b9ab8e1e08c6660db7;p=clang Don't analyze functions when we have parse errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47139 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Analysis/GRSimpleVals.cpp b/Analysis/GRSimpleVals.cpp index 490ed7f31e..1e438ee5b3 100644 --- a/Analysis/GRSimpleVals.cpp +++ b/Analysis/GRSimpleVals.cpp @@ -22,6 +22,9 @@ namespace clang { void RunGRSimpleVals(CFG& cfg, FunctionDecl& FD, ASTContext& Ctx, Diagnostic& Diag) { + if (Diag.hasErrorOccurred()) + return; + GRCoreEngine Engine(cfg, FD, Ctx); GRExprEngine* CheckerState = &Engine.getCheckerState(); GRSimpleVals GRSV;