summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-09-18 22:29:35 +0000
committerTed Kremenek <kremenek@apple.com>2009-09-18 22:29:35 +0000
commit1e7f988f5e437baeaeca8c6e1df0a25ef14ca0ca (patch)
tree952684f1a48635df5c68d3c1b49cc02ebb2dc0be /clang
parentfedc328ae9e37410a84213c840ba785ce5ff44c3 (diff)
downloadbcm5719-llvm-1e7f988f5e437baeaeca8c6e1df0a25ef14ca0ca.tar.gz
bcm5719-llvm-1e7f988f5e437baeaeca8c6e1df0a25ef14ca0ca.zip
Fix regression introduced by r82198 that caused functions/methods with invalid CFGs to get analyzed.
llvm-svn: 82297
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Frontend/AnalysisConsumer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Frontend/AnalysisConsumer.cpp b/clang/lib/Frontend/AnalysisConsumer.cpp
index 0e25de4ff87..d078cb7978d 100644
--- a/clang/lib/Frontend/AnalysisConsumer.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud