]> granicus.if.org Git - clang/commit
Fix the dtor location issues in PR20038 harder.
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 10 Jul 2014 20:42:59 +0000 (20:42 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 10 Jul 2014 20:42:59 +0000 (20:42 +0000)
commitf691c0f189085a40bf0372c7723ab1b650f71978
tree4ae1fb2191a95ec01e226a105b95b922d63ec1e5
parent800e59f1334aa04ce2e9f2e3e06a3df48efc99cc
Fix the dtor location issues in PR20038 harder.

Originally committed in r211722, this fixed one case of dtor calls being
emitted without locations (this causes problems for debug info if the
call is then inlined), this caught only some of the cases.

Instead of trying to re-enable the location before the cleanup, simply
re-enable the location immediately after the unconditional branches in
question using a scoped device to ensure the no-location state doesn't
leak out arbitrarily.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212761 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGenCXX/PR20038.cpp