Changeset 90152a4 for src/SynTree/FunctionDecl.cc
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (7 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
rf9feab8 r90152a4 26 26 #include "Statement.h" // for CompoundStmt 27 27 #include "Type.h" // for Type, FunctionType, Type::FuncSpecif... 28 #include " VarExprReplacer.h"28 #include "DeclReplacer.h" 29 29 30 30 extern bool translation_unit_nomain; … … 41 41 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) { 42 42 43 VarExprReplacer::DeclMap declMap;43 DeclReplacer::DeclMap declMap; 44 44 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); 46 46 } 47 47 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); 49 49 } 50 50 if ( ! declMap.empty() ) { 51 VarExprReplacer replacer( declMap ); 52 acceptMutator( replacer ); 51 DeclReplacer::replace( this, declMap ); 53 52 } 53 cloneAll( other.withExprs, withExprs ); 54 54 } 55 55 … … 57 57 delete type; 58 58 delete statements; 59 deleteAll( withExprs ); 59 60 } 60 61
Note:
See TracChangeset
for help on using the changeset viewer.