Ignore:
Timestamp:
Nov 28, 2017, 10:21:50 AM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
9c35431
Parents:
c0d00b6 (diff), c029f4d (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' into cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    rc0d00b6 rc6e2c18  
    201201                Declaration * postmutate( TraitDecl * contextDecl );
    202202
     203                void premutate( FunctionType * ftype );
     204
    203205          private:
    204206                template<typename AggDecl>
     
    214216                TypeDeclMap typedeclNames;
    215217                int scopeLevel;
     218                bool inFunctionType = false;
    216219        };
    217220
     
    725728                        Type *ret = def->second.first->base->clone();
    726729                        ret->get_qualifiers() |= typeInst->get_qualifiers();
     730                        // attributes are not carried over from typedef to function parameters/return values
     731                        if ( ! inFunctionType ) {
     732                                ret->attributes.splice( ret->attributes.end(), typeInst->attributes );
     733                        } else {
     734                                deleteAll( ret->attributes );
     735                                ret->attributes.clear();
     736                        }
    727737                        // place instance parameters on the typedef'd type
    728738                        if ( ! typeInst->parameters.empty() ) {
     
    901911        Declaration *EliminateTypedef::postmutate( TraitDecl * traitDecl ) {
    902912                return handleAggregate( traitDecl );
     913        }
     914
     915        void EliminateTypedef::premutate( FunctionType * ) {
     916                GuardValue( inFunctionType );
     917                inFunctionType = true;
    903918        }
    904919
Note: See TracChangeset for help on using the changeset viewer.