Ignore:
Timestamp:
Aug 10, 2017, 3:39:11 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, 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:
38d70ab
Parents:
275f4b4 (diff), e1780a2 (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/SymTab/Validate.cc

    r275f4b4 rcd7ef0b  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:50:04 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 30 16:50:13 2017
    13 // Update Count     : 357
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tus Aug  8 13:27:00 2017
     13// Update Count     : 358
    1414//
    1515
     
    686686                Type *designatorType = tyDecl->get_base()->stripDeclarator();
    687687                if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( designatorType ) ) {
    688                         return new StructDecl( aggDecl->get_name() );
     688                        return new StructDecl( aggDecl->get_name(), DeclarationNode::Struct, noAttributes, tyDecl->get_linkage() );
    689689                } else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( designatorType ) ) {
    690                         return new UnionDecl( aggDecl->get_name() );
     690                        return new UnionDecl( aggDecl->get_name(), noAttributes, tyDecl->get_linkage() );
    691691                } else if ( EnumInstType *enumDecl = dynamic_cast< EnumInstType * >( designatorType ) ) {
    692                         return new EnumDecl( enumDecl->get_name() );
     692                        return new EnumDecl( enumDecl->get_name(), noAttributes, tyDecl->get_linkage() );
    693693                } else {
    694694                        return ret->clone();
     
    783783                                type = new EnumInstType( Type::Qualifiers(), newDeclEnumDecl->get_name() );
    784784                        } // if
    785                         TypedefDeclPtr tyDecl( new TypedefDecl( aggDecl->get_name(), Type::StorageClasses(), type ) );
     785                        TypedefDeclPtr tyDecl( new TypedefDecl( aggDecl->get_name(), Type::StorageClasses(), type, aggDecl->get_linkage() ) );
    786786                        typedefNames[ aggDecl->get_name() ] = std::make_pair( std::move( tyDecl ), scopeLevel );
    787787                } // if
     
    903903                FunctionType * ftype = functionDecl->get_functionType();
    904904                std::list< DeclarationWithType * > & retVals = ftype->get_returnVals();
    905                 assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %d", functionDecl->get_name().c_str(), retVals.size() );
     905                assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %zu", functionDecl->get_name().c_str(), retVals.size() );
    906906                if ( retVals.size() == 1 ) {
    907907                        // ensure all function return values have a name - use the name of the function to disambiguate (this also provides a nice bit of help for debugging).
Note: See TracChangeset for help on using the changeset viewer.