Changeset 78a0b88 for src/ResolvExpr/AlternativeFinder.cc
- Timestamp:
- Sep 1, 2017, 3:33:25 PM (7 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:
- bc3127d
- Parents:
- e8ccca3 (diff), a01f7c94 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
re8ccca3 r78a0b88 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 referenceToRvalueConversion( func->expr ); 751 Alternative newFunc( *func ); 752 referenceToRvalueConversion( newFunc.expr ); 752 753 for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) { 753 754 // XXX 754 755 //Designators::check_alternative( function, *actualAlt ); 755 makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) );756 makeFunctionAlternatives( newFunc, function, *actualAlt, std::back_inserter( candidates ) ); 756 757 } 757 758 } 758 759 } 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 ); 763 765 for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) { 764 makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) );766 makeFunctionAlternatives( newFunc, function, *actualAlt, std::back_inserter( candidates ) ); 765 767 } // for 766 768 } // if … … 773 775 if ( PointerType *pointer = dynamic_cast< PointerType* >( funcOp->expr->get_result()->stripReferences() ) ) { 774 776 if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) { 775 referenceToRvalueConversion( funcOp->expr ); 777 Alternative newFunc( *funcOp ); 778 referenceToRvalueConversion( newFunc.expr ); 776 779 for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) { 777 780 AltList currentAlt; 778 781 currentAlt.push_back( *func ); 779 782 currentAlt.insert( currentAlt.end(), actualAlt->begin(), actualAlt->end() ); 780 makeFunctionAlternatives( *funcOp, function, currentAlt, std::back_inserter( candidates ) );783 makeFunctionAlternatives( newFunc, function, currentAlt, std::back_inserter( candidates ) ); 781 784 } // for 782 785 } // if
Note: See TracChangeset
for help on using the changeset viewer.