Changeset 9738e74 for src/InitTweak
- Timestamp:
- May 11, 2017, 4:41:56 PM (8 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:
- 64bc131, edbdbe6
- Parents:
- c2d5e28
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
rc2d5e28 r9738e74 668 668 stmtsToAdd.splice( stmtsToAdd.end(), fixer.stmtsToAdd ); 669 669 unqMap[unqExpr->get_id()] = unqExpr; 670 if ( unqCount[ unqExpr->get_id() ] == 0 ) { // insert destructor after the last use of the unique expression671 stmtsToAdd.splice( stmtsToAddAfter.end(), dtors[ unqExpr->get_id() ] );672 } else { // remember dtors for last instance of unique expr673 dtors[ unqExpr->get_id() ] = fixer.stmtsToAddAfter;674 }675 670 if ( UntypedExpr * deref = dynamic_cast< UntypedExpr * >( unqExpr->get_expr() ) ) { 671 if ( unqCount[ unqExpr->get_id() ] == 0 ) { // insert destructor after the last use of the unique expression 672 stmtsToAdd.splice( stmtsToAddAfter.end(), dtors[ unqExpr->get_id() ] ); 673 } else { // remember dtors for last instance of unique expr 674 dtors[ unqExpr->get_id() ] = fixer.stmtsToAddAfter; 675 } 676 676 // unique expression is now a dereference, because the inner expression is an lvalue returning function call. 677 677 // Normalize the expression by dereferencing the unique expression, rather than the inner expression
Note: See TracChangeset
for help on using the changeset viewer.