Ignore:
Timestamp:
Aug 20, 2016, 5:33:07 AM (9 years ago)
Author:
Aaron Moss <bruceiv@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
80722d0
Parents:
7b1bfc5 (diff), 2037f82 (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 plg2.cs.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    r7b1bfc5 r4a7d895  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Aug 13 18:38:41 2016
    13 // Update Count     : 59
     12// Last Modified On : Thu Aug 18 23:48:44 2016
     13// Update Count     : 64
    1414//
    1515
     
    182182                break;
    183183          case Array:
    184 //PAB           newtype->array->dimension = maybeClone( array->dimension );
    185184                newtype->array->dimension = array->dimension;
    186185                newtype->array->isVarLen = array->isVarLen;
     
    479478}
    480479
    481 Declaration *TypeData::buildDecl( std::string name, DeclarationNode::StorageClass sc, Expression *bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Type linkage, Initializer *init ) const {
     480Declaration *TypeData::buildDecl( std::string name, DeclarationNode::StorageClass sc, Expression *bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, Initializer *init ) const {
    482481        if ( kind == TypeData::Function ) {
    483482                FunctionDecl *decl;
     
    489488                                decl = new FunctionDecl( name, sc, linkage, buildFunction(), body, isInline, isNoreturn );
    490489                        } else {
    491                                 // std::list<Label> ls;
    492                                 decl = new FunctionDecl( name, sc, linkage, buildFunction(), new CompoundStmt( std::list<Label>() ), isInline, isNoreturn );
     490                                // std::list< Label > ls;
     491                                decl = new FunctionDecl( name, sc, linkage, buildFunction(), new CompoundStmt( std::list< Label >() ), isInline, isNoreturn );
    493492                        } // if
    494493                } else {
     
    909908        buildList( enumeration->constants, ret->get_members() );
    910909        std::list< Declaration * >::iterator members = ret->get_members().begin();
    911         for ( const DeclarationNode *cur = enumeration->constants; cur != NULL; cur = dynamic_cast<DeclarationNode *>( cur->get_next() ), ++members ) {
    912                 if ( cur->get_enumeratorValue() != NULL ) {
    913                         ObjectDecl *member = dynamic_cast<ObjectDecl *>(*members);
     910        for ( const DeclarationNode *cur = enumeration->constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) {
     911                if ( cur->get_enumeratorValue() != nullptr ) {
     912                        ObjectDecl *member = dynamic_cast< ObjectDecl * >(*members);
    914913                        member->set_init( new SingleInit( maybeBuild< Expression >( cur->get_enumeratorValue() ), std::list< Expression * >() ) );
    915914                } // if
Note: See TracChangeset for help on using the changeset viewer.