Changes in / [242d458:1b0020a]


Ignore:
Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r242d458 r1b0020a  
    446446                } else if ( StructInstType * st = dynamic_cast< StructInstType * >( initContext ) ) {
    447447                        resolveAggrInit( st->get_baseStruct(), iter, end );
    448                 } else if ( UnionInstType * st = dynamic_cast< UnionInstType * >( initContext ) ) {
     448                } else if ( UnionInstType *st = dynamic_cast< UnionInstType * >( initContext ) ) {
    449449                        resolveAggrInit( st->get_baseUnion(), iter, end );
    450                 } else if ( TypeInstType * tt = dynamic_cast< TypeInstType * >( initContext ) ) {
    451                         Type * base = tt->get_baseType()->get_base();
    452                         if ( base ) {
    453                                 // know the implementation type, so try using that as the initContext
    454                                 initContext = base;
    455                                 visit( listInit );
    456                         } else {
    457                                 // missing implementation type -- might be an unknown type variable, so try proceeding with the current init context
    458                                 Visitor::visit( listInit );
    459                         }
    460450                } else {
    461                         assert( dynamic_cast< BasicType * >( initContext ) || dynamic_cast< PointerType * >( initContext ) );
    462451                        // basic types are handled here
    463452                        Visitor::visit( listInit );
  • src/SymTab/Validate.cc

    r242d458 r1b0020a  
    162162
    163163                typedef std::map< std::string, std::pair< TypedefDecl *, int > > TypedefMap;
    164                 typedef std::map< std::string, TypeDecl * > TypeDeclMap;
    165164                TypedefMap typedefNames;
    166                 TypeDeclMap typedeclNames;
    167165                int scopeLevel;
    168166        };
     
    523521                        delete typeInst;
    524522                        return ret;
    525                 } else {
    526                         TypeDeclMap::const_iterator base = typedeclNames.find( typeInst->get_name() );
    527                         assert( base != typedeclNames.end() );
    528                         typeInst->set_baseType( base->second->clone() );
    529523                } // if
    530524                return typeInst;
     
    571565                        typedefNames.erase( i ) ;
    572566                } // if
    573 
    574                 typedeclNames[ typeDecl->get_name() ] = typeDecl;
    575567                return typeDecl;
    576568        }
Note: See TracChangeset for help on using the changeset viewer.