]> granicus.if.org Git - clang/commitdiff
Don't analyze functions when we have parse errors.
authorTed Kremenek <kremenek@apple.com>
Thu, 14 Feb 2008 22:54:17 +0000 (22:54 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 14 Feb 2008 22:54:17 +0000 (22:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47139 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRSimpleVals.cpp

index 490ed7f31eed6abe39ae9545a86c57920059a1ad..1e438ee5b3d5e12fe82fda2a2443c748d9223f98 100644 (file)
@@ -22,6 +22,9 @@ namespace clang {
   void RunGRSimpleVals(CFG& cfg, FunctionDecl& FD, ASTContext& Ctx,
                       Diagnostic& Diag) {
     
+    if (Diag.hasErrorOccurred())
+      return;
+    
     GRCoreEngine<GRExprEngine> Engine(cfg, FD, Ctx);
     GRExprEngine* CheckerState = &Engine.getCheckerState();
     GRSimpleVals GRSV;