Changeset 03b812d2


Ignore:
Timestamp:
Aug 22, 2016, 3:31:47 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, 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:
bd9f8be
Parents:
8d2844a
Message:

delete UntypedExpr? arguments and fix missing clones

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r8d2844a r03b812d2  
    311311                                                        Type * type = InitTweak::getPointerBase( (*arg)->get_results().front() );
    312312                                                        assert( type );
    313                                                         newExpr->get_results().push_back( type );
     313                                                        newExpr->get_results().push_back( type->clone() );
    314314                                                        *arg = newExpr;
    315315                                                } // if
  • src/InitTweak/FixInit.cc

    r8d2844a r03b812d2  
    284284                        UntypedExpr * untyped = new UntypedExpr( new NameExpr( fname ) );
    285285                        untyped->get_args().push_back( new AddressExpr( new VariableExpr( var ) ) );
    286                         if (cpArg) untyped->get_args().push_back( cpArg );
     286                        if (cpArg) untyped->get_args().push_back( cpArg->clone() );
    287287
    288288                        // resolve copy constructor
  • src/SynTree/Expression.cc

    r8d2844a r03b812d2  
    385385UntypedExpr::~UntypedExpr() {
    386386        delete function;
    387         // deleteAll( args );  //TODO FIXME the arguments are leaked but they seem to be shared in some way
     387        deleteAll( args );
    388388}
    389389
Note: See TracChangeset for help on using the changeset viewer.