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