Changeset 9e7236f4 for src/SymTab
- Timestamp:
- May 2, 2022, 3:18:32 AM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 24ceace
- Parents:
- 2686bc7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r2686bc7 r9e7236f4 760 760 } // if 761 761 } 762 763 762 void LinkReferenceToTypes_old::postvisit( StructInstType * structInst ) { 764 763 const StructDecl * st = local_indexer->lookupStruct( structInst->name ); … … 886 885 void LinkReferenceToTypes_old::postvisit( EnumDecl * enumDecl ) { 887 886 // visit enum members first so that the types of self-referencing members are updated properly 887 // Replace the enum base; right now it works only for StructEnum 888 if ( enumDecl->base && dynamic_cast<TypeInstType*>(enumDecl->base) ) { 889 std::string baseName = static_cast<TypeInstType*>(enumDecl->base)->name; 890 const StructDecl * st = local_indexer->lookupStruct( baseName ); 891 if ( st ) { 892 enumDecl->base = new StructInstType(Type::Qualifiers(),const_cast<StructDecl *>(st)); // Just linking in the node 893 } 894 } 888 895 if ( enumDecl->body ) { 889 896 ForwardEnumsType::iterator fwds = forwardEnums.find( enumDecl->name );
Note:
See TracChangeset
for help on using the changeset viewer.