Changeset 5b40f30 for src/InitTweak/FixInit.cc
- Timestamp:
- Mar 15, 2016, 3:16:53 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- dac0aa9
- Parents:
- 972e6f7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
r972e6f7 r5b40f30 48 48 } 49 49 50 // in the case where an object has an initializer and a polymorphic type, insert an assignment immediately after the51 // declaration. This will (seemingly) cause the later phases to do the right thing with the assignment52 50 ObjectDecl *FixInit::mutate( ObjectDecl *objDecl ) { 53 51 if ( ConstructorInit * ctorInit = dynamic_cast< ConstructorInit * >( objDecl->get_init() ) ) { … … 79 77 if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( exprStmt->get_expr() ) ) { 80 78 if ( VariableExpr * function = dynamic_cast< VariableExpr * >( appExpr->get_function() ) ) { 79 // check for Intrinsic only - don't want to remove all overridable dtors because autogenerated dtor 80 // will call all member dtors, and some members may have a user defined dtor. 81 81 if ( function->get_var()->get_name() == "^?{}" && function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) { 82 82 statements.erase(it++);
Note: See TracChangeset
for help on using the changeset viewer.