Changeset 834d4fc


Ignore:
Timestamp:
Jul 13, 2016, 2:07:35 PM (5 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
956a9c7, 9c791dd
Parents:
6066e32
Message:

recursively convert array expression types to pointers so that multi-dimensional arrays work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AdjustExprType.cc

    r6066e32 r834d4fc  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // AdjustExprType.cc -- 
     7// AdjustExprType.cc --
    88//
    99// Author           : Richard C. Bilson
     
    1212// Last Modified On : Wed Mar  2 17:34:53 2016
    1313// Update Count     : 4
    14 // 
     14//
    1515
    1616#include "typeops.h"
     
    6565
    6666        Type *AdjustExprType::mutate( ArrayType *arrayType ) {
    67                 PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->get_base()->clone() );
     67                // need to recursively mutate the base type in order for multi-dimensional arrays to work.
     68                PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->get_base()->clone()->acceptMutator( *this ) );
    6869                delete arrayType;
    6970                return pointerType;
Note: See TracChangeset for help on using the changeset viewer.