- Timestamp:
 - Nov 2, 2020, 2:10:06 PM (5 years ago)
 - Branches:
 - ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
 - Children:
 - daefe93
 - Parents:
 - e873838
 - File:
 - 
      
- 1 edited
 
- 
          
  src/AST/Pass.impl.hpp (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
src/AST/Pass.impl.hpp
re873838 r82f791f 674 674 const ast::CompoundStmt * ast::Pass< core_t >::visit( const ast::CompoundStmt * node ) { 675 675 VISIT_START( node ); 676 VISIT( {676 VISIT( 677 677 // Do not enter (or leave) a new scope if atFunctionTop. Remember to save the result. 678 678 auto guard1 = makeFuncGuard( [this, enterScope = !this->atFunctionTop]() { … … 681 681 if ( leaveScope ) __pass::symtab::leave(core, 0); 682 682 }); 683 ValueGuard< bool > guard2( inFunction ); 683 ValueGuard< bool > guard2( atFunctionTop ); 684 atFunctionTop = false; 684 685 guard_scope guard3 { *this }; 685 inFunction = false;686 686 maybe_accept( node, &CompoundStmt::kids ); 687 })687 ) 688 688 VISIT_END( CompoundStmt, node ); 689 689 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.