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