Ignore:
Timestamp:
Aug 29, 2016, 11:02:37 AM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
46f6134
Parents:
1e8b02f5 (diff), 6943a987 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

\
Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r1e8b02f5 r5e644d3e  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 25 20:42:25 2016
    13 // Update Count     : 232
     12// Last Modified On : Sun Aug 28 22:12:44 2016
     13// Update Count     : 278
    1414//
    1515
     
    375375}
    376376
    377 void DeclarationNode::checkQualifiers( TypeData *src, TypeData *dst ) {
     377void DeclarationNode::checkQualifiers( const TypeData *src, const TypeData *dst ) {
    378378        TypeData::Qualifiers qsrc = src->qualifiers, qdst = dst->qualifiers;
    379379
     
    801801DeclarationNode *DeclarationNode::extractAggregate() const {
    802802        if ( type ) {
    803                 TypeData *ret = type->extractAggregate();
     803                TypeData *ret = typeextractAggregate( type );
    804804                if ( ret ) {
    805805                        DeclarationNode *newnode = new DeclarationNode;
     
    896896        if ( ! error.empty() ) throw SemanticError( error, this );
    897897        if ( type ) {
    898                 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 );
    899899        } // if
    900900        if ( ! isInline && ! isNoreturn ) {
     
    909909        switch ( type->kind ) {
    910910          case TypeData::Enum:
    911                 return new EnumInstType( type->buildQualifiers(), type->enumeration->name );
     911                return new EnumInstType( buildQualifiers( type ), type->enumeration->name );
    912912          case TypeData::Aggregate: {
    913913                  ReferenceToType *ret;
    914914                  switch ( type->aggregate->kind ) {
    915915                        case DeclarationNode::Struct:
    916                           ret = new StructInstType( type->buildQualifiers(), type->aggregate->name );
     916                          ret = new StructInstType( buildQualifiers( type ), type->aggregate->name );
    917917                          break;
    918918                        case DeclarationNode::Union:
    919                           ret = new UnionInstType( type->buildQualifiers(), type->aggregate->name );
     919                          ret = new UnionInstType( buildQualifiers( type ), type->aggregate->name );
    920920                          break;
    921921                        case DeclarationNode::Trait:
    922                           ret = new TraitInstType( type->buildQualifiers(), type->aggregate->name );
     922                          ret = new TraitInstType( buildQualifiers( type ), type->aggregate->name );
    923923                          break;
    924924                        default:
     
    929929          }
    930930          case TypeData::Symbolic: {
    931                   TypeInstType *ret = new TypeInstType( type->buildQualifiers(), type->symbolic->name, false );
     931                  TypeInstType *ret = new TypeInstType( buildQualifiers( type ), type->symbolic->name, false );
    932932                  buildList( type->symbolic->actuals, ret->get_parameters() );
    933933                  return ret;
    934934          }
    935935          default:
    936                 return type->build();
     936                return typebuild( type );
    937937        } // switch
    938938}
Note: See TracChangeset for help on using the changeset viewer.