Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    rb644d6f rfac84be  
    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.