Changes in src/Parser/DeclarationNode.cc [8e9cbb2:45161b4d]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r8e9cbb2 r45161b4d 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // DeclarationNode.cc -- 7 // DeclarationNode.cc -- 8 8 // 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 30 14:39:51201613 // Update Count : 16 312 // Last Modified On : Wed Apr 13 16:53:17 2016 13 // Update Count : 161 14 14 // 15 15 … … 97 97 os << endl << string( indent + 2, ' ' ) << "with initializer "; 98 98 initializer->printOneLine( os ); 99 os << " maybe constructed? " << initializer->get_maybeConstructed();100 101 99 } // if 102 100 … … 355 353 } // if 356 354 } 357 355 358 356 DeclarationNode *DeclarationNode::addQualifiers( DeclarationNode *q ) { 359 357 if ( q ) { … … 506 504 assert( false ); 507 505 } // switch 508 506 509 507 return this; 510 508 } … … 617 615 assert( a->type->kind == TypeData::Array ); 618 616 TypeData *lastArray = findLast( a->type ); 619 if ( type ) { 617 if ( type ) { 620 618 switch ( type->kind ) { 621 619 case TypeData::Aggregate: … … 661 659 } // if 662 660 } 663 661 664 662 DeclarationNode *DeclarationNode::addIdList( DeclarationNode *ids ) { 665 663 type = addIdListToType( type, ids ); … … 855 853 Declaration *DeclarationNode::build() const { 856 854 if ( type ) { 857 return type->buildDecl( name, buildStorageClass(), maybeBuild< Expression >( bitfieldWidth ), buildFuncSpecifier( Inline ), buildFuncSpecifier( Noreturn ), linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension ); 855 Declaration *newDecl = type->buildDecl( name, buildStorageClass(), maybeBuild< Expression >( bitfieldWidth ), buildFuncSpecifier( Inline ), buildFuncSpecifier( Noreturn ), linkage, maybeBuild< Initializer >(initializer) ); 856 return newDecl; 858 857 } // if 859 858 if ( ! buildFuncSpecifier( Inline ) && ! buildFuncSpecifier( Noreturn ) ) { 860 return (new ObjectDecl( name, buildStorageClass(), linkage, maybeBuild< Expression >( bitfieldWidth ), 0, maybeBuild< Initializer >( initializer ) ))->set_extension( extension);859 return new ObjectDecl( name, buildStorageClass(), linkage, maybeBuild< Expression >( bitfieldWidth ), 0, maybeBuild< Initializer >( initializer ) ); 861 860 } // if 862 861 throw SemanticError( "invalid function specifier in declaration of ", this ); … … 865 864 Type *DeclarationNode::buildType() const { 866 865 assert( type ); 867 866 868 867 switch ( type->kind ) { 869 868 case TypeData::Enum:
Note:
See TracChangeset
for help on using the changeset viewer.