Changes in src/Parser/TypeData.cc [bd46af4:cbce272]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
rbd46af4 rcbce272 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Aug 14 10:41:00 201713 // Update Count : 56 812 // Last Modified On : Wed Aug 9 13:50:00 2017 13 // Update Count : 567 14 14 // 15 15 … … 63 63 aggregate.fields = nullptr; 64 64 aggregate.body = false; 65 aggregate.tagged = false; 66 aggregate.parent = nullptr; 65 67 break; 66 68 case AggregateInst: … … 121 123 delete aggregate.actuals; 122 124 delete aggregate.fields; 125 delete aggregate.parent; 123 126 // delete aggregate; 124 127 break; … … 621 624 switch ( td->aggregate.kind ) { 622 625 case DeclarationNode::Struct: 626 if ( td->aggregate.tagged ) { 627 at = new StructDecl( *td->aggregate.name, td->aggregate.parent, attributes, linkage ); 628 buildForall( td->aggregate.params, at->get_parameters() ); 629 break; 630 } 623 631 case DeclarationNode::Coroutine: 624 632 case DeclarationNode::Monitor: … … 628 636 break; 629 637 case DeclarationNode::Union: 630 at = new UnionDecl( *td->aggregate.name, attributes , linkage);638 at = new UnionDecl( *td->aggregate.name, attributes ); 631 639 buildForall( td->aggregate.params, at->get_parameters() ); 632 640 break; 633 641 case DeclarationNode::Trait: 634 at = new TraitDecl( *td->aggregate.name, attributes , linkage);642 at = new TraitDecl( *td->aggregate.name, attributes ); 635 643 buildList( td->aggregate.params, at->get_parameters() ); 636 644 break; … … 649 657 case TypeData::Enum: { 650 658 if ( type->enumeration.body ) { 651 EnumDecl * typedecl = buildEnum( type, attributes , linkage);659 EnumDecl * typedecl = buildEnum( type, attributes ); 652 660 return new EnumInstType( buildQualifiers( type ), typedecl ); 653 661 } else { … … 754 762 } // buildSymbolic 755 763 756 EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes , LinkageSpec::Spec linkage) {764 EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes ) { 757 765 assert( td->kind == TypeData::Enum ); 758 EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes , linkage);766 EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes ); 759 767 buildList( td->enumeration.constants, ret->get_members() ); 760 768 list< Declaration * >::iterator members = ret->get_members().begin(); … … 807 815 return buildAggregate( td, attributes, linkage ); 808 816 } else if ( td->kind == TypeData::Enum ) { 809 return buildEnum( td, attributes , linkage);817 return buildEnum( td, attributes ); 810 818 } else if ( td->kind == TypeData::Symbolic ) { 811 819 return buildSymbolic( td, name, scs, linkage );
Note: See TracChangeset
for help on using the changeset viewer.