Changeset fc638d2 for src/SynTree
- Timestamp:
- Dec 13, 2016, 4:13:08 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 7933351
- Parents:
- f7e749f
- Location:
- src/SynTree
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/CompoundStmt.cc
rf7e749f rfc638d2 49 49 Statement * origStmt = *origit++; 50 50 if ( DeclStmt * declStmt = dynamic_cast< DeclStmt * >( s ) ) { 51 DeclStmt * origDeclStmt = dynamic_cast< DeclStmt * >( origStmt ); 52 assert( origDeclStmt ); 51 DeclStmt * origDeclStmt = safe_dynamic_cast< DeclStmt * >( origStmt ); 53 52 if ( DeclarationWithType * dwt = dynamic_cast< DeclarationWithType * > ( declStmt->get_decl() ) ) { 54 DeclarationWithType * origdwt = dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() ); 55 assert( origdwt ); 53 DeclarationWithType * origdwt = safe_dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() ); 56 54 assert( dwt->get_name() == origdwt->get_name() ); 57 55 declMap[ origdwt ] = dwt; 58 } 59 } 56 } else assert( ! dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() ) ); 57 } else assert( ! dynamic_cast< DeclStmt * > ( s ) ); 60 58 } 61 59 if ( ! declMap.empty() ) { -
src/SynTree/Initializer.cc
rf7e749f rfc638d2 65 65 } 66 66 67 ListInit::ListInit( const ListInit & other ) : Initializer( other ) { 68 cloneAll( other.initializers, initializers ); 69 cloneAll( other.designators, designators ); 70 } 71 72 67 73 ListInit::~ListInit() { 68 74 deleteAll( initializers ); -
src/SynTree/Initializer.h
rf7e749f rfc638d2 88 88 ListInit( const std::list<Initializer*> &initializers, 89 89 const std::list<Expression *> &designators = std::list< Expression * >(), bool maybeConstructed = false ); 90 ListInit( const ListInit & other ); 90 91 virtual ~ListInit(); 91 92 -
src/SynTree/VarExprReplacer.cc
rf7e749f rfc638d2 21 21 // replace variable with new node from decl map 22 22 void VarExprReplacer::visit( VariableExpr * varExpr ) { 23 // xxx - assertions and parameters aren't accounted for in this... (i.e. they aren't inserted into the map when it's made, only DeclStmts are) 23 24 if ( declMap.count( varExpr->get_var() ) ) { 24 25 varExpr->set_var( declMap.at( varExpr->get_var() ) );
Note:
See TracChangeset
for help on using the changeset viewer.