Changeset ec010a9
- Timestamp:
- Sep 27, 2017, 4:05:33 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:
- c4d80cb
- Parents:
- 7bcb8eb
- git-author:
- Rob Schluntz <rschlunt@…> (09/27/17 16:05:26)
- git-committer:
- Rob Schluntz <rschlunt@…> (09/27/17 16:05:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
r7bcb8eb rec010a9 26 26 #include "Statement.h" // for CompoundStmt 27 27 #include "Type.h" // for Type, FunctionType, Type::FuncSpecif... 28 #include "VarExprReplacer.h" 28 29 29 30 extern bool translation_unit_nomain; … … 39 40 FunctionDecl::FunctionDecl( const FunctionDecl &other ) 40 41 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) { 42 43 VarExprReplacer::DeclMap declMap; 44 for ( auto p : group_iterate( other.type->parameters, type->parameters ) ) { 45 declMap[ std::get<0>(p) ] = std::get<1>(p); 46 } 47 for ( auto p : group_iterate( other.type->returnVals, type->returnVals ) ) { 48 declMap[ std::get<0>(p) ] = std::get<1>(p); 49 } 50 if ( ! declMap.empty() ) { 51 VarExprReplacer replacer( declMap ); 52 accept( replacer ); 53 } 41 54 } 42 55
Note: See TracChangeset
for help on using the changeset viewer.