diff options
author | Peter Szecsi <szepet95@gmail.com> | 2017-07-25 23:49:16 +0000 |
---|---|---|
committer | Peter Szecsi <szepet95@gmail.com> | 2017-07-25 23:49:16 +0000 |
commit | d39a7ed1ace6967aa5f5262ef8131e987e065495 (patch) | |
tree | 9bb5491ca4e60215d7af87b7a35c572e7340a4f2 | |
parent | b1305ce038f1d8be346f4287dcc13d056576f7c2 (diff) | |
download | bcm5719-llvm-d39a7ed1ace6967aa5f5262ef8131e987e065495.tar.gz bcm5719-llvm-d39a7ed1ace6967aa5f5262ef8131e987e065495.zip |
[StaticAnalyzer] LoopUnrolling - Attempt #2 to fix a crash in r309006.
llvm-svn: 309061
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp b/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp index c44122e1872..dd37cbd2184 100644 --- a/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp +++ b/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp @@ -183,9 +183,9 @@ bool isUnrolledLoopBlock(const CFGBlock *Block, ExplodedNode *Pred, LBV.setBlocksOfLoop(E.first, M); // In case of an inlined function call check if any of its callSiteBlock is // marked. - while (BlockSet.find(SearchedBlock) == BlockSet.end() && !StackFrame->inTopFrame()) { + while (BlockSet.find(SearchedBlock) == BlockSet.end() && StackFrame) { SearchedBlock = StackFrame->getCallSiteBlock(); - if(!SearchedBlock) + if(!SearchedBlock || StackFrame->inTopFrame()) break; StackFrame = StackFrame->getParent()->getCurrentStackFrame(); } |