Ignore:
Timestamp:
Jun 1, 2018, 7:53:55 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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, with_gc
Children:
d56cc219
Parents:
ecae5860 (diff), 262bd63 (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/ResolvExpr/AdjustExprType.cc

    recae5860 radb6a4f1  
    6666
    6767        Type * AdjustExprType::postmutate( ArrayType * arrayType ) {
    68                 PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->base );
     68                PointerType *pointerType = new PointerType{ arrayType->get_qualifiers(), arrayType->base };
    6969                arrayType->base = nullptr;
    7070                delete arrayType;
     
    7373
    7474        Type * AdjustExprType::postmutate( FunctionType * functionType ) {
    75                 return new PointerType( Type::Qualifiers(), functionType );
     75                return new PointerType{ Type::Qualifiers(), functionType };
    7676        }
    7777
    7878        Type * AdjustExprType::postmutate( TypeInstType * typeInst ) {
    79                 EqvClass eqvClass;
    80                 if ( env.lookup( typeInst->get_name(), eqvClass ) ) {
    81                         if ( eqvClass.data.kind == TypeDecl::Ftype ) {
    82                                 PointerType *pointerType = new PointerType( Type::Qualifiers(), typeInst );
    83                                 return pointerType;
     79                if ( const EqvClass* eqvClass = env.lookup( typeInst->get_name() ) ) {
     80                        if ( eqvClass->data.kind == TypeDecl::Ftype ) {
     81                                return new PointerType{ Type::Qualifiers(), typeInst };
    8482                        }
    8583                } else if ( NamedTypeDecl *ntDecl = indexer.lookupType( typeInst->get_name() ) ) {
    8684                        if ( TypeDecl *tyDecl = dynamic_cast< TypeDecl* >( ntDecl ) ) {
    8785                                if ( tyDecl->get_kind() == TypeDecl::Ftype ) {
    88                                         PointerType *pointerType = new PointerType( Type::Qualifiers(), typeInst );
    89                                         return pointerType;
     86                                        return new PointerType{ Type::Qualifiers(), typeInst };
    9087                                } // if
    9188                        } // if
Note: See TracChangeset for help on using the changeset viewer.