Changes in src/Parser/DeclarationNode.cc [413ad05:c1c1112]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r413ad05 rc1c1112 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Aug 28 22:12:44201613 // Update Count : 2 7812 // Last Modified On : Thu Aug 25 20:42:25 2016 13 // Update Count : 232 14 14 // 15 15 … … 50 50 newnode->isInline = isInline; 51 51 newnode->isNoreturn = isNoreturn; 52 newnode->bitfieldWidth = maybeClone( bitfieldWidth );52 newnode->bitfieldWidth = bitfieldWidth; 53 53 newnode->hasEllipsis = hasEllipsis; 54 newnode->initializer = maybeClone( initializer );54 newnode->initializer = initializer; 55 55 newnode->set_next( maybeClone( get_next() ) ); 56 56 newnode->linkage = linkage; … … 375 375 } 376 376 377 void DeclarationNode::checkQualifiers( const TypeData *src, constTypeData *dst ) {377 void DeclarationNode::checkQualifiers( TypeData *src, TypeData *dst ) { 378 378 TypeData::Qualifiers qsrc = src->qualifiers, qdst = dst->qualifiers; 379 379 … … 801 801 DeclarationNode *DeclarationNode::extractAggregate() const { 802 802 if ( type ) { 803 TypeData *ret = type extractAggregate( type);803 TypeData *ret = type->extractAggregate(); 804 804 if ( ret ) { 805 805 DeclarationNode *newnode = new DeclarationNode; … … 823 823 *out++ = decl; 824 824 } // if 825 delete extr;826 825 } // if 827 826 Declaration *decl = cur->build(); … … 896 895 if ( ! error.empty() ) throw SemanticError( error, this ); 897 896 if ( type ) { 898 return buildDecl( type,name, storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );897 return type->buildDecl( name, storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension ); 899 898 } // if 900 899 if ( ! isInline && ! isNoreturn ) { … … 909 908 switch ( type->kind ) { 910 909 case TypeData::Enum: 911 return new EnumInstType( buildQualifiers( type), type->enumeration->name );910 return new EnumInstType( type->buildQualifiers(), type->enumeration->name ); 912 911 case TypeData::Aggregate: { 913 912 ReferenceToType *ret; 914 913 switch ( type->aggregate->kind ) { 915 914 case DeclarationNode::Struct: 916 ret = new StructInstType( buildQualifiers( type), type->aggregate->name );915 ret = new StructInstType( type->buildQualifiers(), type->aggregate->name ); 917 916 break; 918 917 case DeclarationNode::Union: 919 ret = new UnionInstType( buildQualifiers( type), type->aggregate->name );918 ret = new UnionInstType( type->buildQualifiers(), type->aggregate->name ); 920 919 break; 921 920 case DeclarationNode::Trait: 922 ret = new TraitInstType( buildQualifiers( type), type->aggregate->name );921 ret = new TraitInstType( type->buildQualifiers(), type->aggregate->name ); 923 922 break; 924 923 default: … … 929 928 } 930 929 case TypeData::Symbolic: { 931 TypeInstType *ret = new TypeInstType( buildQualifiers( type), type->symbolic->name, false );930 TypeInstType *ret = new TypeInstType( type->buildQualifiers(), type->symbolic->name, false ); 932 931 buildList( type->symbolic->actuals, ret->get_parameters() ); 933 932 return ret; 934 933 } 935 934 default: 936 return type build( type);935 return type->build(); 937 936 } // switch 938 937 }
Note:
See TracChangeset
for help on using the changeset viewer.