summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2013-09-06 08:12:48 +0000
committerPavel Labath <labath@google.com>2013-09-06 08:12:48 +0000
commit1ae74842cd1be37a8d99d0865623ef16432d3b67 (patch)
tree84a42c30991b8762cf49d0365b72b6e4996430b0 /lib/CodeGen/CodeGenFunction.cpp
parentdb4813a3997fcf3864d1190f8021ef68e42cc057 (diff)
downloadclang-1ae74842cd1be37a8d99d0865623ef16432d3b67.tar.gz
clang-1ae74842cd1be37a8d99d0865623ef16432d3b67.tar.bz2
clang-1ae74842cd1be37a8d99d0865623ef16432d3b67.tar.xz
Avoid double edges when constructing CFGs
Summary: If a noreturn destructor is executed while returning a value from a function, the resulting CFG has had two edges to the exit block. This crashed the analyzer, because it expects that blocks with no terminators have only one outgoing edge. I added code to avoid creating the second edge in this case. PS: The crashes did not manifest themselves always, as usually the NoReturnFunctionChecker would stop program evaluation before the analyzer hit the assertion, but in the case of lifetime extended temporaries, the checker failed to do that (which is a separate bug in itself). Reviewers: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1513 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190125 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions