Changeset fa2c005 for src/Validate/ReplaceTypedef.cpp
- Timestamp:
- Jun 8, 2023, 3:19:43 PM (3 years ago)
- Branches:
- ADT
- Parents:
- 044ae62
- File:
-
- 1 edited
-
src/Validate/ReplaceTypedef.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/ReplaceTypedef.cpp
r044ae62 rfa2c005 60 60 ast::StructDecl const * previsit( ast::StructDecl const * ); 61 61 ast::UnionDecl const * previsit( ast::UnionDecl const * ); 62 ast::AdtDecl const * previsit( ast::AdtDecl const * ); 62 63 void previsit( ast::EnumDecl const * ); 63 64 void previsit( ast::TraitDecl const * ); … … 90 91 } 91 92 93 // Here, 5/30 92 94 ast::Type const * ReplaceTypedefCore::postvisit( 93 95 ast::TypeInstType const * type ) { 94 96 // Instances of typedef types will come here. If it is an instance 95 97 // of a typedef type, link the instance to its actual type. 96 TypedefMap::const_iterator def = typedefNames.find( type->name ); 98 TypedefMap::const_iterator def = typedefNames.find( type->name ); // because of this 97 99 if ( def != typedefNames.end() ) { 98 100 ast::Type * ret = ast::deepCopy( def->second.first->base ); … … 260 262 } 261 263 264 ast::AdtDecl const * ReplaceTypedefCore::previsit( ast::AdtDecl const * decl ) { 265 visit_children = false; 266 addImplicitTypedef( decl ); 267 return handleAggregate( decl ); 268 } 269 262 270 ast::UnionDecl const * ReplaceTypedefCore::previsit( ast::UnionDecl const * decl ) { 263 271 visit_children = false; … … 287 295 } else if ( auto enumDecl = dynamic_cast<const ast::EnumDecl *>( aggrDecl ) ) { 288 296 type = new ast::EnumInstType( enumDecl->name ); 297 } else if ( auto adtDecl = dynamic_cast<const ast::AdtDecl *>( aggrDecl )) { 298 type = new ast::AdtInstType( adtDecl->name ); 289 299 } 290 300 assert( type );
Note:
See TracChangeset
for help on using the changeset viewer.