Ignore:
Timestamp:
Aug 27, 2018, 4:40:34 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b7c89aa
Parents:
f9feab8 (diff), 305581d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/FunctionDecl.cc

    rf9feab8 r90152a4  
    2626#include "Statement.h"           // for CompoundStmt
    2727#include "Type.h"                // for Type, FunctionType, Type::FuncSpecif...
    28 #include "VarExprReplacer.h"
     28#include "DeclReplacer.h"
    2929
    3030extern bool translation_unit_nomain;
     
    4141                : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {
    4242
    43         VarExprReplacer::DeclMap declMap;
     43        DeclReplacer::DeclMap declMap;
    4444        for ( auto p : group_iterate( other.type->parameters, type->parameters ) ) {
    45                 declMap[ std::get<0>(p) ] = new VariableExpr( std::get<1>(p) );
     45                declMap[ std::get<0>(p) ] = std::get<1>(p);
    4646        }
    4747        for ( auto p : group_iterate( other.type->returnVals, type->returnVals ) ) {
    48                 declMap[ std::get<0>(p) ] = new VariableExpr( std::get<1>(p) );
     48                declMap[ std::get<0>(p) ] = std::get<1>(p);
    4949        }
    5050        if ( ! declMap.empty() ) {
    51                 VarExprReplacer replacer( declMap );
    52                 acceptMutator( replacer );
     51                DeclReplacer::replace( this, declMap );
    5352        }
     53        cloneAll( other.withExprs, withExprs );
    5454}
    5555
     
    5757        delete type;
    5858        delete statements;
     59        deleteAll( withExprs );
    5960}
    6061
Note: See TracChangeset for help on using the changeset viewer.