Changeset b7778c1 for src/InitTweak


Ignore:
Timestamp:
Oct 4, 2017, 3:31:43 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
3364962
Parents:
3628765 (diff), bb9d8e8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r3628765 rb7778c1  
    390390                        assert( env );
    391391                        CP_CTOR_PRINT( std::cerr << "Type Substitution: " << *env << std::endl; )
    392                         assert( arg->has_result() );
     392                        assert( arg->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                                 retExpr->set_env( callExpr->get_env() );
    555                                 callExpr->set_env( nullptr );
     554                                std::swap( retExpr->env, callExpr->env );
    556555                                return retExpr;
    557556                        } else {
     
    811810                        GuardValue( labelVars );
    812811                        labelVars.clear();
     812                        // LabelFinder does not recurse into FunctionDecl, so need to visit
     813                        // its children manually.
    813814                        maybeAccept( funcDecl->type, finder );
    814815                        maybeAccept( funcDecl->statements, finder );
     
    11261127                        static UniqueName tempNamer( "_tmp_ctor_expr" );
    11271128                        // xxx - is the size check necessary?
    1128                         assert( ctorExpr->has_result() && ctorExpr->get_result()->size() == 1 );
     1129                        assert( ctorExpr->result && ctorExpr->get_result()->size() == 1 );
    11291130
    11301131                        // 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.