Changes in src/ResolvExpr/CurrentObject.cc [da5ac2e:2908f08]
- File:
-
- 1 edited
-
src/ResolvExpr/CurrentObject.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CurrentObject.cc
rda5ac2e r2908f08 498 498 PRINT( std::cerr << "____untyped: " << expr << std::endl; ) 499 499 auto dit = desigAlts.begin(); 500 auto nexpr = dynamic_cast< const NameExpr * >( expr );501 500 502 501 for ( const Type * t : curTypes ) { 503 502 assert( dit != desigAlts.end() ); 504 503 DesignatorChain & d = *dit; 505 // Name Designation: 506 if ( nexpr ) { 504 if ( auto nexpr = dynamic_cast< const NameExpr *>( expr ) ) { 507 505 PRINT( std::cerr << "____actual: " << t << std::endl; ) 508 506 if ( auto refType = dynamic_cast< const BaseInstType * >( t ) ) { … … 517 515 } 518 516 } 517 } else if ( auto at = dynamic_cast< const ArrayType * >( t ) ) { 518 auto nexpr = dynamic_cast< const NameExpr *>( expr ); 519 for ( const Decl * mem : refType->lookup( nexpr->name ) ) { 520 if ( auto field = dynamic_cast< const ObjectDecl * >( mem ) ) { 521 DesignatorChain d2 = d; 522 d2.emplace_back( new VariableExpr{ expr->location, field } ); 523 newDesigAlts.emplace_back( std::move( d2 ) ); 524 newTypes.emplace_back( at->base ); 525 } 526 } 519 527 } 520 528 521 529 ++dit; 522 // Index Designation:523 530 } else { 524 531 if ( auto at = dynamic_cast< const ArrayType * >( t ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.