Changeset 82f791f


Ignore:
Timestamp:
Nov 2, 2020, 2:10:06 PM (12 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
daefe93
Parents:
e873838
Message:

Fixed ast::Pass::visit(CompoundStmt?*) so it updates the right variable. It gets us through the standard library.

File:
1 edited

Legend:

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

    re873838 r82f791f  
    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.