summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-08-18 00:30:23 +0000
committerJordan Rose <jordan_rose@apple.com>2012-08-18 00:30:23 +0000
commita4309c941c622f45f5fe58faaa0227a7f8b4da16 (patch)
treead936344f0cab15cf816ef5e74badaa77ff4f8eb /clang/lib/Parse/ParseTentative.cpp
parenta97a99736e7f0160a8a872850e8f8775908d7c31 (diff)
downloadbcm5719-llvm-a4309c941c622f45f5fe58faaa0227a7f8b4da16.tar.gz
bcm5719-llvm-a4309c941c622f45f5fe58faaa0227a7f8b4da16.zip
[analyzer] Treat C++ 'throw' as a sink.
Our current handling of 'throw' is all CFG-based: it jumps to a 'catch' block if there is one and the function exit block if not. But this doesn't really get the right behavior when a function is inlined: execution will continue on the caller's side, which is always the wrong thing to do. Even within a single function, 'throw' completely skips any destructors that are to be run. This is essentially the same problem as @finally -- a CFGBlock that can have multiple entry points, whose exit points depend on whether it was entered normally or exceptionally. Representing 'throw' as a sink matches our current (non-)handling of @throw. It's not a perfect solution, but it's better than continuing analysis in an inconsistent or even impossible state. <rdar://problem/12113713> llvm-svn: 162157
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud