Changeset 0b8cd722 for translator/Parser/TypedefTable.cc
- Timestamp:
- Jan 8, 2015, 2:37:47 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 6c3744e
- Parents:
- 17cd4eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Parser/TypedefTable.cc
r17cd4eb r0b8cd722 106 106 void TypedefTable::leaveScope(void) { 107 107 debugPrint( "Leaving scope " << currentScope << endl ); 108 for (tableType::iterator i = table.begin(); i != table.end(); i++) {108 for (tableType::iterator i = table.begin(); i != table.end(); ) { 109 109 list<Entry> &declList = (*i).second; 110 110 while (!declList.empty() && declList.front().scope == currentScope) { 111 111 declList.pop_front(); 112 112 } 113 if ( declList.empty() ) { 114 table.erase( i );115 } 113 if ( declList.empty() ) { // standard idom for erasing during traversal 114 table.erase( i++ ); 115 } else ++i; 116 116 } 117 117 currentScope -= 1;
Note: See TracChangeset
for help on using the changeset viewer.