Ignore:
Timestamp:
Mar 15, 2016, 3:16:53 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, 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, resolv-new, with_gc
Children:
dac0aa9
Parents:
972e6f7
Message:

generate correct empty list initializer, ensure function return value is not incorrectly destructed before it is returned, do not add src parameter to autogenerated routines when they take a single argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r972e6f7 r5b40f30  
    4848        }
    4949
    50         // in the case where an object has an initializer and a polymorphic type, insert an assignment immediately after the
    51         // declaration. This will (seemingly) cause the later phases to do the right thing with the assignment
    5250        ObjectDecl *FixInit::mutate( ObjectDecl *objDecl ) {
    5351                if ( ConstructorInit * ctorInit = dynamic_cast< ConstructorInit * >( objDecl->get_init() ) ) {
     
    7977                                if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( exprStmt->get_expr() ) ) {
    8078                                        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.
    8181                                                if ( function->get_var()->get_name() == "^?{}" && function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) {
    8282                                                        statements.erase(it++);
Note: See TracChangeset for help on using the changeset viewer.