Changeset c28afead for src/Parser


Ignore:
Timestamp:
Apr 19, 2018, 6:11:07 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:
8633f060
Parents:
9dc31c10 (diff), 60ba456 (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:

fix conflict

Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r9dc31c10 rc28afead  
    928928                                delete newType->aggInst.aggregate->enumeration.constants;
    929929                                newType->aggInst.aggregate->enumeration.constants = nullptr;
     930                                newType->aggInst.aggregate->enumeration.body = false;
    930931                        } else {
    931932                                assert( newType->aggInst.aggregate->kind == TypeData::Aggregate );
    932933                                delete newType->aggInst.aggregate->aggregate.fields;
    933934                                newType->aggInst.aggregate->aggregate.fields = nullptr;
     935                                newType->aggInst.aggregate->aggregate.body = false;
    934936                        } // if
    935937                        // don't hoist twice
  • src/Parser/ExpressionNode.cc

    r9dc31c10 rc28afead  
    211211        if ( Unsigned && size < 2 ) {                                           // hh or h, less than int ?
    212212                // int i = -1uh => 65535 not -1, so cast is necessary for unsigned, which unfortunately eliminates warnings for large values.
    213                 ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][size] ) );
     213                ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][size] ), false );
    214214        } else if ( lnth != -1 ) {                                                      // explicit length ?
    215215                if ( lnth == 5 ) {                                                              // int128 ?
    216216                        size = 5;
    217                         ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][size] ) );
     217                        ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][size] ), false );
    218218                } else {
    219                         ret = new CastExpr( ret, new TypeInstType( Type::Qualifiers(), lnthsInt[Unsigned][lnth], false ) );
     219                        ret = new CastExpr( ret, new TypeInstType( Type::Qualifiers(), lnthsInt[Unsigned][lnth], false ), false );
    220220                } // if
    221221        } // if
     
    285285        Expression * ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[complx][size] ), str, v ) );
    286286        if ( lnth != -1 ) {                                                                     // explicit length ?
    287                 ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[complx][size] ) );
     287                ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[complx][size] ), false );
    288288        } // if
    289289
     
    408408        if ( dynamic_cast< VoidType * >( targetType ) ) {
    409409                delete targetType;
    410                 return new CastExpr( maybeMoveBuild< Expression >(expr_node) );
     410                return new CastExpr( maybeMoveBuild< Expression >(expr_node), false );
    411411        } else {
    412                 return new CastExpr( maybeMoveBuild< Expression >(expr_node), targetType );
     412                return new CastExpr( maybeMoveBuild< Expression >(expr_node), targetType, false );
    413413        } // if
    414414} // build_cast
  • src/Parser/TypeData.cc

    r9dc31c10 rc28afead  
    490490        switch ( td->kind ) {
    491491          case TypeData::Aggregate:
    492                 if ( ! toplevel && td->aggregate.fields ) {
     492                if ( ! toplevel && td->aggregate.body ) {
    493493                        ret = td->clone();
    494494                } // if
    495495                break;
    496496          case TypeData::Enum:
    497                 if ( ! toplevel && td->enumeration.constants ) {
     497                if ( ! toplevel && td->enumeration.body ) {
    498498                        ret = td->clone();
    499499                } // if
Note: See TracChangeset for help on using the changeset viewer.