Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r7641b6c rba3706f  
    382382                        } // if
    383383                        delete stmt;
    384                         if ( TupleAssignExpr * assign = dynamic_cast< TupleAssignExpr * >( resolved ) ) {
    385                                 // fix newly generated StmtExpr
    386                                 postvisit( assign->stmtExpr );
    387                         }
    388384                        return resolved;
    389385                }
     
    483479                                env->apply( result );
    484480                                ObjectDecl * ret = ObjectDecl::newObject( retNamer.newName(), result, nullptr );
    485                                 ret->type->set_const( false );
    486                                 stmtExpr->returnDecls.push_front( ret );
     481                                ret->get_type()->set_const( false );
     482                                stmtExpr->get_returnDecls().push_front( ret );
    487483
    488484                                // must have a non-empty body, otherwise it wouldn't have a result
    489                                 CompoundStmt * body = stmtExpr->statements;
     485                                CompoundStmt * body = stmtExpr->get_statements();
    490486                                assert( ! body->get_kids().empty() );
    491487                                // must be an ExprStmt, otherwise it wouldn't have a result
    492488                                ExprStmt * last = strict_dynamic_cast< ExprStmt * >( body->get_kids().back() );
    493                                 last->expr = makeCtorDtor( "?{}", ret, last->get_expr() );
    494 
    495                                 stmtExpr->dtors.push_front( makeCtorDtor( "^?{}", ret ) );
     489                                last->set_expr( makeCtorDtor( "?{}", ret, last->get_expr() ) );
     490
     491                                stmtExpr->get_dtors().push_front( makeCtorDtor( "^?{}", ret ) );
    496492                        } // if
    497493                }
     
    610606                                // must have a non-empty body, otherwise it wouldn't have a result
    611607                                assert( ! stmts.empty() );
    612                                 assertf( ! stmtExpr->get_returnDecls().empty(), "StmtExpr returns non-void, but no return decls: %s", toString( stmtExpr ).c_str() );
     608                                assert( ! stmtExpr->get_returnDecls().empty() );
    613609                                stmts.push_back( new ExprStmt( new VariableExpr( stmtExpr->get_returnDecls().front() ) ) );
    614610                                stmtExpr->get_returnDecls().clear();
Note: See TracChangeset for help on using the changeset viewer.