Changeset a32b204 for translator/Parser/TypeData.cc
- Timestamp:
- May 17, 2015, 1:19:35 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 0dd3a2f
- Parents:
- b87a5ed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Parser/TypeData.cc
rb87a5ed ra32b204 405 405 switch ( kind ) { 406 406 case Aggregate: 407 if ( ! toplevel && aggregate->members ) {407 if ( ! toplevel && aggregate->members ) { 408 408 ret = clone(); 409 409 ret->qualifiers.clear(); … … 411 411 break; 412 412 case Enum: 413 if ( ! toplevel && enumeration->constants ) {413 if ( ! toplevel && enumeration->constants ) { 414 414 ret = clone(); 415 415 ret->qualifiers.clear(); … … 556 556 557 557 for ( std::list< DeclarationNode::BasicType >::const_iterator i = basic->typeSpec.begin(); i != basic->typeSpec.end(); ++i ) { 558 if ( ! init ) {558 if ( ! init ) { 559 559 init = true; 560 560 if ( *i == DeclarationNode::Void ) { 561 if ( basic->typeSpec.size() != 1 || ! basic->modifiers.empty() ) {561 if ( basic->typeSpec.size() != 1 || ! basic->modifiers.empty() ) { 562 562 throw SemanticError( "invalid type specifier \"void\" in type: ", this ); 563 563 } else { … … 635 635 switch ( *i ) { 636 636 case DeclarationNode::Long: 637 if ( ! init ) {637 if ( ! init ) { 638 638 init = true; 639 639 ret = BasicType::LongSignedInt; … … 667 667 break; 668 668 case DeclarationNode::Short: 669 if ( ! init ) {669 if ( ! init ) { 670 670 init = true; 671 671 ret = BasicType::ShortSignedInt; … … 684 684 break; 685 685 case DeclarationNode::Signed: 686 if ( ! init ) {686 if ( ! init ) { 687 687 init = true; 688 688 ret = BasicType::SignedInt; … … 709 709 break; 710 710 case DeclarationNode::Unsigned: 711 if ( ! init ) {711 if ( ! init ) { 712 712 init = true; 713 713 ret = BasicType::UnsignedInt; … … 744 744 745 745 BasicType *bt; 746 if ( ! init ) {746 if ( ! init ) { 747 747 bt = new BasicType( buildQualifiers(), BasicType::SignedInt ); 748 748 } else { … … 781 781 assert( kind == Function ); 782 782 bool hasEllipsis = function->params ? function->params->get_hasEllipsis() : true; 783 if ( ! function->params ) hasEllipsis = !function->newStyle;783 if ( ! function->params ) hasEllipsis = ! function->newStyle; 784 784 FunctionType *ft = new FunctionType( buildQualifiers(), hasEllipsis ); 785 785 buildList( function->params, ft->get_parameters() );
Note: See TracChangeset
for help on using the changeset viewer.