Ignore:
Timestamp:
Sep 26, 2019, 1:25:49 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
70b4ea2, ea2074e
Parents:
849720f
Message:

Removed lvalue from types in the old ast.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r849720f rb4f8808  
    115115        assert( var->get_type() );
    116116        Type * type = var->get_type()->clone();
    117         type->set_lvalue( true );
    118117
    119118        // xxx - doesn't quite work yet - get different alternatives with the same cost
     
    125124        //      long long int value;
    126125        //      if ( decl->valueOf( var, value ) ) {
    127         //              type->set_lvalue( false );
     126        //              type->set_lvalue( false ); // Would have to move to get_lvalue.
    128127        //      }
    129128        // }
     
    384383        sub.apply( res );
    385384        result = res;
    386         result->set_lvalue( true );
    387385        result->get_qualifiers() |= aggregate->result->get_qualifiers();
    388386}
     
    433431                        // if references are still allowed in the AST, dereference returns a reference
    434432                        ret->set_result( new ReferenceType( Type::Qualifiers(), ret->get_result() ) );
    435                 } else {
    436                         // references have been removed, in which case dereference returns an lvalue of the base type.
    437                         ret->result->set_lvalue( true );
    438433                }
    439434        }
     
    591586CompoundLiteralExpr::CompoundLiteralExpr( Type * type, Initializer * initializer ) : initializer( initializer ) {
    592587        assert( type && initializer );
    593         type->set_lvalue( true );
    594588        set_result( type );
    595589}
Note: See TracChangeset for help on using the changeset viewer.