- Timestamp:
- Feb 22, 2024, 1:43:00 PM (10 months ago)
- Branches:
- master
- Children:
- 2beaf9b
- Parents:
- 7bb516f
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r7bb516f r2810700 1041 1041 // FIX ME: computes $1 twice 1042 1042 | logical_OR_expression '?' /* empty */ ':' conditional_expression // GCC, omitted first operand 1043 { $$ = new ExpressionNode( build_cond( yylloc, $1, $1->clone(), $4 ) ); }1043 { $$ = new ExpressionNode( build_cond( yylloc, $1, nullptr, $4 ) ); } 1044 1044 ; 1045 1045 -
src/ResolvExpr/CandidateFinder.cpp
r7bb516f r2810700 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 ast::Expr const * arg2 = conditionalExpr->arg2; 1521 arg2 = arg2 ? arg2 : conditionalExpr->arg1.get(); 1520 1522 CandidateFinder finder2( context, tenv ); 1521 1523 finder2.allowVoid = true; 1522 finder2.find( conditionalExpr->arg2, ResolveMode::withAdjustment() );1524 finder2.find( arg2, ResolveMode::withAdjustment() ); 1523 1525 if ( finder2.candidates.empty() ) return; 1524 1526
Note: See TracChangeset
for help on using the changeset viewer.