Changes in src/AST/Pass.impl.hpp [c6c682cf:293dc1c]
- File:
-
- 1 edited
-
src/AST/Pass.impl.hpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.impl.hpp
rc6c682cf r293dc1c 20 20 #include <unordered_map> 21 21 22 #include "AST/TranslationUnit.hpp" 22 23 #include "AST/TypeSubstitution.hpp" 23 24 … … 430 431 pass_visitor_stats.depth--; 431 432 if ( !errors.isEmpty() ) { throw errors; } 433 } 434 435 template< typename core_t > 436 inline void ast::accept_all( ast::TranslationUnit & unit, ast::Pass< core_t > & visitor ) { 437 return ast::accept_all( unit.decls, visitor ); 432 438 } 433 439 … … 674 680 const ast::CompoundStmt * ast::Pass< core_t >::visit( const ast::CompoundStmt * node ) { 675 681 VISIT_START( node ); 676 VISIT( {682 VISIT( 677 683 // Do not enter (or leave) a new scope if atFunctionTop. Remember to save the result. 678 684 auto guard1 = makeFuncGuard( [this, enterScope = !this->atFunctionTop]() { … … 681 687 if ( leaveScope ) __pass::symtab::leave(core, 0); 682 688 }); 683 ValueGuard< bool > guard2( inFunction ); 689 ValueGuard< bool > guard2( atFunctionTop ); 690 atFunctionTop = false; 684 691 guard_scope guard3 { *this }; 685 inFunction = false;686 692 maybe_accept( node, &CompoundStmt::kids ); 687 })693 ) 688 694 VISIT_END( CompoundStmt, node ); 689 695 }
Note:
See TracChangeset
for help on using the changeset viewer.