Changeset 46aa60e for src/ResolvExpr/CandidateFinder.cpp
- Timestamp:
- Feb 23, 2024, 11:41:10 PM (3 months ago)
- Branches:
- master
- Children:
- 0a9b5c1, 1e93617
- Parents:
- 3d5a8cb (diff), 1761046 (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. - git-author:
- Peter A. Buhr <pabuhr@…> (02/23/24 18:54:24)
- git-committer:
- Peter A. Buhr <pabuhr@…> (02/23/24 23:41:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r3d5a8cb r46aa60e 1512 1512 void Finder::postvisit( const ast::ConditionalExpr * conditionalExpr ) { 1513 1513 // candidates for condition 1514 ast::ptr<ast::Expr> arg1 = notZeroExpr( conditionalExpr->arg1 ); 1514 1515 CandidateFinder finder1( context, tenv ); 1515 ast::ptr<ast::Expr> arg1 = notZeroExpr( conditionalExpr->arg1 );1516 1516 finder1.find( arg1, ResolveMode::withAdjustment() ); 1517 1517 if ( finder1.candidates.empty() ) return; 1518 1518 1519 1519 // candidates for true result 1520 // FIX ME: resolves and runs arg1 twice when arg2 is missing. 1521 ast::Expr const * arg2 = conditionalExpr->arg2; 1522 arg2 = arg2 ? arg2 : conditionalExpr->arg1.get(); 1520 1523 CandidateFinder finder2( context, tenv ); 1521 1524 finder2.allowVoid = true; 1522 finder2.find( conditionalExpr->arg2, ResolveMode::withAdjustment() );1525 finder2.find( arg2, ResolveMode::withAdjustment() ); 1523 1526 if ( finder2.candidates.empty() ) return; 1524 1527
Note: See TracChangeset
for help on using the changeset viewer.