Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r8e9cbb2 r45161b4d  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // DeclarationNode.cc --
     7// DeclarationNode.cc -- 
    88//
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun 30 14:39:51 2016
    13 // Update Count     : 163
     12// Last Modified On : Wed Apr 13 16:53:17 2016
     13// Update Count     : 161
    1414//
    1515
     
    9797                os << endl << string( indent + 2, ' ' ) << "with initializer ";
    9898                initializer->printOneLine( os );
    99                 os << " maybe constructed? " << initializer->get_maybeConstructed();
    100 
    10199        } // if
    102100
     
    355353        } // if
    356354}
    357 
     355         
    358356DeclarationNode *DeclarationNode::addQualifiers( DeclarationNode *q ) {
    359357        if ( q ) {
     
    506504                assert( false );
    507505        } // switch
    508 
     506       
    509507        return this;
    510508}
     
    617615                assert( a->type->kind == TypeData::Array );
    618616                TypeData *lastArray = findLast( a->type );
    619                 if ( type ) {
     617                if ( type ) { 
    620618                        switch ( type->kind ) {
    621619                          case TypeData::Aggregate:
     
    661659        } // if
    662660}
    663 
     661       
    664662DeclarationNode *DeclarationNode::addIdList( DeclarationNode *ids ) {
    665663        type = addIdListToType( type, ids );
     
    855853Declaration *DeclarationNode::build() const {
    856854        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;
    858857        } // if
    859858        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 ) );
    861860        } // if
    862861        throw SemanticError( "invalid function specifier in declaration of ", this );
     
    865864Type *DeclarationNode::buildType() const {
    866865        assert( type );
    867 
     866 
    868867        switch ( type->kind ) {
    869868          case TypeData::Enum:
Note: See TracChangeset for help on using the changeset viewer.