Changes in src/SymTab/Validate.cc [95d09bdb:8a3ecb9]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r95d09bdb r8a3ecb9 85 85 void previsit( AlignofExpr * ); 86 86 void previsit( UntypedOffsetofExpr * ); 87 void previsit( CompoundLiteralExpr * );88 87 void handleType( Type * ); 89 88 }; … … 351 350 } 352 351 353 void HoistTypeDecls::previsit( CompoundLiteralExpr * expr ) {354 handleType( expr->result );355 }356 357 352 358 353 Type * FixQualifiedTypes::postmutate( QualifiedType * qualType ) { … … 368 363 auto base = td->base; 369 364 assert( base ); 370 return base->clone(); 365 Type * ret = base->clone(); 366 ret->get_qualifiers() = qualType->get_qualifiers(); 367 return ret; 371 368 } else { 372 369 // .T => T is not a type name … … 388 385 if ( StructDecl * aggr = dynamic_cast< StructDecl * >( member ) ) { 389 386 if ( aggr->name == inst->name ) { 387 // TODO: is this case, and other non-TypeInstType cases, necessary? 390 388 return new StructInstType( qualType->get_qualifiers(), aggr ); 391 389 } … … 404 402 } 405 403 } else if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( child ) ) { 406 // struct typedefs are being replaced by forward decls too early; move it to hoist struct404 // name on the right is a typedef 407 405 if ( NamedTypeDecl * aggr = dynamic_cast< NamedTypeDecl * > ( member ) ) { 408 406 if ( aggr->name == inst->name ) { 409 407 assert( aggr->base ); 410 return aggr->base->clone(); 408 Type * ret = aggr->base->clone(); 409 ret->get_qualifiers() = qualType->get_qualifiers(); 410 return ret; 411 411 } 412 412 }
Note: See TracChangeset
for help on using the changeset viewer.