Ignore:
Timestamp:
Sep 22, 2017, 5:46:54 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
7cddf77
Parents:
8b11840 (diff), aec3e6b (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 'fix-bug-geninit'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.cc

    r8b11840 rb56c17c  
    7575                // that need to be constructed or destructed
    7676                void previsit( StructDecl *aggregateDecl );
    77                 void premutate( AggregateDecl * ) { visit_children = false; }
    78                 void premutate( NamedTypeDecl * ) { visit_children = false; }
     77                void previsit( AggregateDecl * ) { visit_children = false; }
     78                void previsit( NamedTypeDecl * ) { visit_children = false; }
    7979                void previsit( FunctionType * ) { visit_children = false; }
    8080
     
    130130                // hands off if the function returns a reference - we don't want to allocate a temporary if a variable's address
    131131                // is being returned
    132                 if ( returnStmt->get_expr() && returnVals.size() == 1 && tryConstruct( returnVals.front() ) ) {
     132                if ( returnStmt->get_expr() && returnVals.size() == 1 && isConstructable( returnVals.front()->get_type() ) ) {
    133133                        // explicitly construct the return value using the return expression and the retVal object
    134134                        assertf( returnVals.front()->get_name() != "", "Function %s has unnamed return value\n", funcName.c_str() );
Note: See TracChangeset for help on using the changeset viewer.