Changeset 0661678
- Timestamp:
- May 19, 2017, 2:33:38 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- d298e03
- Parents:
- 8905f56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
r8905f56 r0661678 896 896 Parent::visit( compoundStmt ); 897 897 898 // add destructors for the current scope that we're exiting 898 // add destructors for the current scope that we're exiting, unless the last statement is a return, which 899 // causes unreachable code warnings 899 900 std::list< Statement * > & statements = compoundStmt->get_kids(); 900 insertDtors( reverseDeclOrder.front().begin(), reverseDeclOrder.front().end(), back_inserter( statements ) ); 901 if ( ! statements.empty() && ! dynamic_cast< ReturnStmt * >( statements.back() ) ) { 902 insertDtors( reverseDeclOrder.front().begin(), reverseDeclOrder.front().end(), back_inserter( statements ) ); 903 } 901 904 reverseDeclOrder.pop_front(); 902 905 }
Note: See TracChangeset
for help on using the changeset viewer.