Test case in the next commit, which enables destructors under certain
circumstances.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160805
91177308-0d34-0410-b5e6-
96231b3b80d8
for (CFGBlock::const_reverse_iterator it = block->rbegin(),
ei = block->rend(); it != ei; ++it) {
const CFGElement &elem = *it;
+
+ if (const CFGAutomaticObjDtor *Dtor = dyn_cast<CFGAutomaticObjDtor>(&elem)){
+ val.liveDecls = DSetFact.add(val.liveDecls, Dtor->getVarDecl());
+ continue;
+ }
+
if (!isa<CFGStmt>(elem))
continue;