Ignore:
Timestamp:
Jun 3, 2015, 11:21:01 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, string, with_gc
Children:
9a8930f
Parents:
4162aea9 (diff), 30651b0 (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' into labels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r4162aea9 r1136d96  
    159159
    160160                if ( ArrayType * at = dynamic_cast< ArrayType * >( new_type ) ){
    161                         BasicType arrayLenType = BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt );
    162                         CastExpr *castExpr = new CastExpr( at->get_dimension(), arrayLenType.clone() );
    163                         Expression *newExpr = findSingleExpression( castExpr, *this );
    164                         delete at->get_dimension();
    165                         at->set_dimension( newExpr );
     161                        if ( at->get_dimension() ) {
     162                                BasicType arrayLenType = BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt );
     163                                CastExpr *castExpr = new CastExpr( at->get_dimension(), arrayLenType.clone() );
     164                                Expression *newExpr = findSingleExpression( castExpr, *this );
     165                                delete at->get_dimension();
     166                                at->set_dimension( newExpr );
     167                        }
    166168                }
    167169        }
Note: See TracChangeset for help on using the changeset viewer.