Changes in src/ResolvExpr/Resolver.cc [60aaa51d:2d11663]
- File:
-
- 1 edited
-
src/ResolvExpr/Resolver.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r60aaa51d r2d11663 1227 1227 void previsit( const ast::WaitForStmt * ); 1228 1228 1229 const ast::SingleInit * previsit( const ast::SingleInit * );1230 const ast::ListInit * previsit( const ast::ListInit * );1231 voidprevisit( const ast::ConstructorInit * );1229 const ast::SingleInit * previsit( const ast::SingleInit * ); 1230 const ast::ListInit * previsit( const ast::ListInit * ); 1231 const ast::ConstructorInit * previsit( const ast::ConstructorInit * ); 1232 1232 }; 1233 1233 … … 1510 1510 // iterate designations and initializers in pairs, moving the cursor to the current 1511 1511 // designated object and resolving the initializer against that object 1512 #warning unimplemented; Resolver port in progress 1513 assert(false); 1514 } 1512 listInit = ast::mutate_field_index( 1513 listInit, &ast::ListInit::designations, i, 1514 currentObject.findNext( listInit->designations[i] ) ); 1515 listInit = ast::mutate_field_index( 1516 listInit, &ast::ListInit::initializers, i, 1517 listInit->initializers[i]->accept( *visitor ) ); 1518 } 1519 1520 // move cursor out of brace-enclosed initializer-list 1521 currentObject.exitListInit(); 1515 1522 1516 1523 visit_children = false; … … 1518 1525 } 1519 1526 1520 void Resolver_new::previsit( const ast::ConstructorInit * ctorInit ) { 1521 #warning unimplemented; Resolver port in progress 1522 (void)ctorInit; 1523 assert(false); 1527 const ast::ConstructorInit * Resolver_new::previsit( const ast::ConstructorInit * ctorInit ) { 1528 visitor->maybe_accept( ctorInit, &ast::ConstructorInit::ctor ); 1529 visitor->maybe_accept( ctorInit, &ast::ConstructorInit::dtor ); 1530 1531 // found a constructor - can get rid of C-style initializer 1532 // xxx - Rob suggests this field is dead code 1533 ctorInit = ast::mutate_field( ctorInit, &ast::ConstructorInit::init, nullptr ); 1534 1535 // intrinsic single-parameter constructors and destructors do nothing. Since this was 1536 // implicitly generated, there's no way for it to have side effects, so get rid of it to 1537 // clean up generated code 1538 if ( InitTweak::isIntrinsicSingleArgCallStmt( ctorInit->ctor ) ) { 1539 ctorInit = ast::mutate_field( ctorInit, &ast::ConstructorInit::ctor, nullptr ); 1540 } 1541 if ( InitTweak::isIntrinsicSingleArgCallStmt( ctorInit->dtor ) ) { 1542 ctorInit = ast::mutate_field( ctorInit, &ast::ConstructorInit::dtor, nullptr ); 1543 } 1544 1545 return ctorInit; 1524 1546 } 1525 1547
Note:
See TracChangeset
for help on using the changeset viewer.