Ignore:
Timestamp:
Jul 23, 2018, 6:00:57 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
e68b3a8
Parents:
cbdf565 (diff), c29c342 (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

    rcbdf565 r2514607d  
    368368                                auto base = td->base;
    369369                                assert( base );
    370                                 return base->clone();
     370                                Type * ret = base->clone();
     371                                ret->get_qualifiers() = qualType->get_qualifiers();
     372                                return ret;
    371373                        } else {
    372374                                // .T => T is not a type name
     
    388390                                        if ( StructDecl * aggr = dynamic_cast< StructDecl * >( member ) ) {
    389391                                                if ( aggr->name == inst->name ) {
     392                                                        // TODO: is this case, and other non-TypeInstType cases, necessary?
    390393                                                        return new StructInstType( qualType->get_qualifiers(), aggr );
    391394                                                }
     
    404407                                        }
    405408                                } else if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( child ) ) {
    406                                         // struct typedefs are being replaced by forward decls too early; move it to hoist struct
     409                                        // name on the right is a typedef
    407410                                        if ( NamedTypeDecl * aggr = dynamic_cast< NamedTypeDecl * > ( member ) ) {
    408411                                                if ( aggr->name == inst->name ) {
    409412                                                        assert( aggr->base );
    410                                                         return aggr->base->clone();
     413                                                        Type * ret = aggr->base->clone();
     414                                                        ret->get_qualifiers() = qualType->get_qualifiers();
     415                                                        return ret;
    411416                                                }
    412417                                        }
Note: See TracChangeset for help on using the changeset viewer.