aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-11-13 00:12:13 +0000
committerTed Kremenek <kremenek@apple.com>2012-11-13 00:12:13 +0000
commit8f81acfa95a5d2a22fc875c1a10901eaa30b8405 (patch)
tree2420792b183fab0706308eaab67deee7201f60d5 /lib/Driver/Tools.cpp
parentd05df512cd6dfa32a696bcdd3dced825efe94bc4 (diff)
Fix bad CFG construction bug when handling C++ 'try' statements.
This code assigned the last created CFGBlock* to the variable 'Block', which is a scratch variable which is null'ed out after a block is completed. By assigning the last created block to 'Block', we start editing a completed block, inserting CFGStmts that should be in another block. This was the case with 'try'. The test case that showed this had a while loop inside a 'try', and the logic before the while loop was being included as part of the "condition block" for the loop. This showed up as a bogus dead store, but could have lots of implications. Turns out this bug was replicated a few times within CFG.cpp, so I went and fixed up those as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
0 files changed, 0 insertions, 0 deletions