Changeset 346a0bf


Ignore:
Timestamp:
May 12, 2016, 2:12:38 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, 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:
102b0cd, cc3528f
Parents:
3e8fb3b (diff), 228851d (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:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r3e8fb3b r346a0bf  
    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 : Wed Apr 13 16:39:30 2016
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed May 11 13:13:16 2016
    1313// Update Count     : 251
    1414//
     
    192192                template<typename AggDecl>
    193193                void addImplicitTypedef( AggDecl * aggDecl );
    194                
     194
    195195                typedef std::map< std::string, std::pair< TypedefDecl *, int > > TypedefMap;
    196196                TypedefMap typedefNames;
     
    715715                                }
    716716
     717                                if ( dwt->get_name() == "" ) {
     718                                        // don't assign to anonymous members
     719                                        // xxx - this is a temporary fix. Anonymous members tie into
     720                                        // our inheritance model. I think the correct way to handle this is to
     721                                        // cast the structure to the type of the member and let the resolver
     722                                        // figure out whether it's valid and have a pass afterwards that fixes
     723                                        // the assignment to use pointer arithmetic with the offset of the
     724                                        // member, much like how generic type members are handled.
     725                                        continue;
     726                                }
     727
    717728                                if ( isGeneric ) {
    718729                                        // rewrite member type in terms of the type variables on this operator
     
    773784                makeUnionFieldsAssignment( srcParam, dstParam, cloneWithParams( refType, unionParams ), back_inserter( assignDecl->get_statements()->get_kids() ) );
    774785                if ( isGeneric ) makeUnionFieldsAssignment( srcParam, returnVal, cloneWithParams( refType, unionParams ), back_inserter( assignDecl->get_statements()->get_kids() ) );
    775                
     786
    776787                if ( ! isGeneric ) assignDecl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new VariableExpr( srcParam ) ) );
    777788
     
    10331044                return aggDecl;
    10341045        }
    1035        
     1046
    10361047        template<typename AggDecl>
    10371048        void EliminateTypedef::addImplicitTypedef( AggDecl * aggDecl ) {
Note: See TracChangeset for help on using the changeset viewer.