From 546bded9ba9676e7ddae45b9ab8e1e08c6660db7 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 14 Feb 2008 22:54:17 +0000 Subject: [PATCH] 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 --- Analysis/GRSimpleVals.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.50.1