CFG: Delay creating Dtors for CompoundStmts which end in ReturnStmt
Summary: VisitReturnStmt would create a new block with including Dtors, so the Dtors created in VisitCompoundStmts would be in an unreachable block. Example: struct S { ~S(); }; void f() { S s; return; } void g() { S s; } Before this patch, f has one additional unreachable block containing just the destructor of S. With this patch, both f and g have the same blocks. Reviewers: krememek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13973 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253107 91177308-0d34-0410-b5e6-96231b3b80d8
Loading
Please register or sign in to comment