Changeset 90152a4 for src/SynTree/CompoundStmt.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/CompoundStmt.cc
rf9feab8 r90152a4 23 23 #include "Statement.h" // for CompoundStmt, Statement, DeclStmt 24 24 #include "SynTree/Label.h" // for Label 25 #include "SynTree/ VarExprReplacer.h" // for VarExprReplacer, VarExprReplace...25 #include "SynTree/DeclReplacer.h" // for DeclReplacer 26 26 27 27 using std::string; … … 49 49 // recursively execute this routine. There may be more efficient ways of doing 50 50 // this. 51 VarExprReplacer::DeclMap declMap;51 DeclReplacer::DeclMap declMap; 52 52 std::list< Statement * >::const_iterator origit = other.kids.begin(); 53 53 for ( Statement * s : kids ) { … … 59 59 DeclarationWithType * origdwt = strict_dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() ); 60 60 assert( dwt->get_name() == origdwt->get_name() ); 61 declMap[ origdwt ] = new VariableExpr( dwt );61 declMap[ origdwt ] = dwt; 62 62 } else assert( ! dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() ) ); 63 63 } else assert( ! dynamic_cast< DeclStmt * > ( s ) ); 64 64 } 65 65 if ( ! declMap.empty() ) { 66 VarExprReplacer replacer( declMap ); 67 acceptMutator( replacer ); 66 DeclReplacer::replace( this, declMap ); 68 67 } 69 68 }
Note:
See TracChangeset
for help on using the changeset viewer.