projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1f1f85
)
Fix ICE in consumed analysis when CFG is null.
author
DeLesley Hutchins
<delesley@google.com>
Tue, 10 Sep 2013 23:10:10 +0000
(23:10 +0000)
committer
DeLesley Hutchins
<delesley@google.com>
Tue, 10 Sep 2013 23:10:10 +0000
(23:10 +0000)
llvm-svn: 190447
clang/lib/Analysis/Consumed.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Analysis/Consumed.cpp
b/clang/lib/Analysis/Consumed.cpp
index
b540d75
..
7cd0290
100644
(file)
--- a/
clang/lib/Analysis/Consumed.cpp
+++ b/
clang/lib/Analysis/Consumed.cpp
@@
-1103,12
+1103,16
@@
bool ConsumedAnalyzer::splitState(const CFGBlock *CurrBlock,
void ConsumedAnalyzer::run(AnalysisDeclContext &AC) {
const FunctionDecl *D = dyn_cast_or_null<FunctionDecl>(AC.getDecl());
+ if (!D)
+ return;
- if (!D) return;
+ CFG *CFGraph = AC.getCFG();
+ if (!CFGraph)
+ return;
determineExpectedReturnState(AC, D);
- BlockInfo = ConsumedBlockInfo(
AC.getCFG()
);
+ BlockInfo = ConsumedBlockInfo(
CFGraph
);
PostOrderCFGView *SortedGraph = AC.getAnalysis<PostOrderCFGView>();