- File:
-
- 1 edited
-
src/ResolvExpr/AlternativeFinder.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r326338ae rb128d3e 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 23:52:08 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Jul 26 11:33:00201713 // Update Count : 3 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Aug 28 13:47:24 2017 13 // Update Count : 32 14 14 // 15 15 … … 195 195 AltList winners; 196 196 findMinCost( alternatives.begin(), alternatives.end(), back_inserter( winners ) ); 197 stream << "Can 't choose between " << winners.size() << " alternatives for expression ";197 stream << "Cannot choose between " << winners.size() << " alternatives for expression "; 198 198 expr->print( stream ); 199 199 stream << "Alternatives are:"; … … 749 749 if ( PointerType *pointer = dynamic_cast< PointerType* >( func->expr->get_result()->stripReferences() ) ) { 750 750 if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) { 751 Alternative newFunc( *func ); 752 referenceToRvalueConversion( newFunc.expr ); 751 referenceToRvalueConversion( func->expr ); 753 752 for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) { 754 753 // XXX 755 754 //Designators::check_alternative( function, *actualAlt ); 756 makeFunctionAlternatives( newFunc, function, *actualAlt, std::back_inserter( candidates ) );755 makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) ); 757 756 } 758 757 } 759 758 } else if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( func->expr->get_result()->stripReferences() ) ) { // handle ftype (e.g. *? on function pointer) 759 referenceToRvalueConversion( func->expr ); 760 760 EqvClass eqvClass; 761 761 if ( func->env.lookup( typeInst->get_name(), eqvClass ) && eqvClass.type ) { 762 762 if ( FunctionType *function = dynamic_cast< FunctionType* >( eqvClass.type ) ) { 763 Alternative newFunc( *func );764 referenceToRvalueConversion( newFunc.expr );765 763 for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) { 766 makeFunctionAlternatives( newFunc, function, *actualAlt, std::back_inserter( candidates ) );764 makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) ); 767 765 } // for 768 766 } // if … … 775 773 if ( PointerType *pointer = dynamic_cast< PointerType* >( funcOp->expr->get_result()->stripReferences() ) ) { 776 774 if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) { 777 Alternative newFunc( *funcOp ); 778 referenceToRvalueConversion( newFunc.expr ); 775 referenceToRvalueConversion( funcOp->expr ); 779 776 for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) { 780 777 AltList currentAlt; 781 778 currentAlt.push_back( *func ); 782 779 currentAlt.insert( currentAlt.end(), actualAlt->begin(), actualAlt->end() ); 783 makeFunctionAlternatives( newFunc, function, currentAlt, std::back_inserter( candidates ) );780 makeFunctionAlternatives( *funcOp, function, currentAlt, std::back_inserter( candidates ) ); 784 781 } // for 785 782 } // if
Note:
See TracChangeset
for help on using the changeset viewer.