From 75d03cffe20b5c945ef04eba208efb0437339997 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 18 Sep 2009 22:29:35 +0000 Subject: [PATCH] Fix regression introduced by r82198 that caused functions/methods with invalid CFGs to get analyzed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82297 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/AnalysisConsumer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp index 0e25de4ff8..d078cb7978 100644 --- a/lib/Frontend/AnalysisConsumer.cpp +++ b/lib/Frontend/AnalysisConsumer.cpp @@ -301,7 +301,12 @@ static void ActionGRExprEngine(AnalysisManager& mgr, Decl *D, // Display progress. mgr.DisplayFunction(D); - // Construct the analysis engine. + // Construct the analysis engine. We first query for the LiveVariables + // information to see if the CFG is valid. + // FIXME: Inter-procedural analysis will need to handle invalid CFGs. + if (!mgr.getLiveVariables(D)) + return; + GRExprEngine Eng(mgr); Eng.setTransferFunctions(tf); -- 2.50.1