Ignore:
Timestamp:
May 5, 2017, 1:38:42 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
805c167, c352893
Parents:
43426d4 (diff), 4f9636f (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 branches 'master' and 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    r43426d4 r982ed5b  
    766766                        } // if
    767767                } // for
    768                 // function may return struct or union value, in which case we need to add alternatives for implicit conversions to each of the anonymous members
     768
     769                candidates.clear();
     770                candidates.splice( candidates.end(), alternatives );
     771
     772                findMinCost( candidates.begin(), candidates.end(), std::back_inserter( alternatives ) );
     773
     774                // function may return struct or union value, in which case we need to add alternatives for implicit
     775                // conversions to each of the anonymous members, must happen after findMinCost since anon conversions
     776                // are never the cheapest expression
    769777                for ( const Alternative & alt : alternatives ) {
    770778                        addAnonConversions( alt );
    771779                }
    772 
    773                 candidates.clear();
    774                 candidates.splice( candidates.end(), alternatives );
    775 
    776                 findMinCost( candidates.begin(), candidates.end(), std::back_inserter( alternatives ) );
    777780
    778781                if ( alternatives.empty() && targetType && ! targetType->isVoid() ) {
Note: See TracChangeset for help on using the changeset viewer.