Changeset da5ac2e


Ignore:
Timestamp:
Nov 27, 2023, 3:38:05 PM (5 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
4bc4b4c
Parents:
2d373440
Message:

Removed unused case in CurrentObject::findNext. Did a bit of clean-up in the area.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CurrentObject.cc

    r2d373440 rda5ac2e  
    498498                PRINT( std::cerr << "____untyped: " << expr << std::endl; )
    499499                auto dit = desigAlts.begin();
     500                auto nexpr = dynamic_cast< const NameExpr * >( expr );
    500501
    501502                for ( const Type * t : curTypes ) {
    502503                        assert( dit != desigAlts.end() );
    503504                        DesignatorChain & d = *dit;
    504                         if ( auto nexpr = dynamic_cast< const NameExpr *>( expr ) ) {
     505                        // Name Designation:
     506                        if ( nexpr ) {
    505507                                PRINT( std::cerr << "____actual: " << t << std::endl; )
    506508                                if ( auto refType = dynamic_cast< const BaseInstType * >( t ) ) {
     
    515517                                                }
    516518                                        }
    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                                         }
    527519                                }
    528520
    529521                                ++dit;
     522                        // Index Designation:
    530523                        } else {
    531524                                if ( auto at = dynamic_cast< const ArrayType * >( t ) ) {
Note: See TracChangeset for help on using the changeset viewer.