Changes in / [dbb1073:daefe93]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.impl.hpp

    rdbb1073 rdaefe93  
    674674const ast::CompoundStmt * ast::Pass< core_t >::visit( const ast::CompoundStmt * node ) {
    675675        VISIT_START( node );
    676         VISIT({
     676        VISIT(
    677677                // Do not enter (or leave) a new scope if atFunctionTop. Remember to save the result.
    678678                auto guard1 = makeFuncGuard( [this, enterScope = !this->atFunctionTop]() {
     
    681681                        if ( leaveScope ) __pass::symtab::leave(core, 0);
    682682                });
    683                 ValueGuard< bool > guard2( inFunction );
     683                ValueGuard< bool > guard2( atFunctionTop );
     684                atFunctionTop = false;
    684685                guard_scope guard3 { *this };
    685                 inFunction = false;
    686686                maybe_accept( node, &CompoundStmt::kids );
    687         })
     687        )
    688688        VISIT_END( CompoundStmt, node );
    689689}
Note: See TracChangeset for help on using the changeset viewer.