Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r680620d r3c398b6  
    390390                        assert( env );
    391391                        CP_CTOR_PRINT( std::cerr << "Type Substitution: " << *env << std::endl; )
    392                         assert( arg->result );
     392                        assert( arg->has_result() );
    393393                        Type * result = arg->get_result();
    394394                        if ( skipCopyConstruct( result ) ) return; // skip certain non-copyable types
     
    552552                                Expression * retExpr = new CommaExpr( assign, new VariableExpr( returnDecl ) );
    553553                                // move env from callExpr to retExpr
    554                                 std::swap( retExpr->env, callExpr->env );
     554                                retExpr->set_env( callExpr->get_env() );
     555                                callExpr->set_env( nullptr );
    555556                                return retExpr;
    556557                        } else {
     
    810811                        GuardValue( labelVars );
    811812                        labelVars.clear();
    812                         // LabelFinder does not recurse into FunctionDecl, so need to visit
    813                         // its children manually.
    814813                        maybeAccept( funcDecl->type, finder );
    815814                        maybeAccept( funcDecl->statements, finder );
     
    11271126                        static UniqueName tempNamer( "_tmp_ctor_expr" );
    11281127                        // xxx - is the size check necessary?
    1129                         assert( ctorExpr->result && ctorExpr->get_result()->size() == 1 );
     1128                        assert( ctorExpr->has_result() && ctorExpr->get_result()->size() == 1 );
    11301129
    11311130                        // xxx - ideally we would reuse the temporary generated from the copy constructor passes from within firstArg if it exists and not generate a temporary if it's unnecessary.
Note: See TracChangeset for help on using the changeset viewer.