Changeset ca946a4
- Timestamp:
- May 3, 2017, 5:03:29 PM (8 years ago)
- 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:
- bdd0755
- Parents:
- dba6db9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
rdba6db9 rca946a4 766 766 } // if 767 767 } // 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 769 777 for ( const Alternative & alt : alternatives ) { 770 778 addAnonConversions( alt ); 771 779 } 772 773 candidates.clear();774 candidates.splice( candidates.end(), alternatives );775 776 findMinCost( candidates.begin(), candidates.end(), std::back_inserter( alternatives ) );777 780 778 781 if ( alternatives.empty() && targetType && ! targetType->isVoid() ) {
Note: See TracChangeset
for help on using the changeset viewer.