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