Changeset 0690350 for src/SynTree


Ignore:
Timestamp:
Jan 12, 2018, 4:57:40 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, resolv-new, with_gc
Children:
1a4bef3
Parents:
bd0b6b62
git-author:
Rob Schluntz <rschlunt@…> (01/12/18 15:24:25)
git-committer:
Rob Schluntz <rschlunt@…> (01/12/18 16:57:40)
Message:

Minor code cleanup

Location:
src/SynTree
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AggregateDecl.cc

    rbd0b6b62 r0690350  
    9292                } else if ( ConstantExpr * constExpr = dynamic_cast< ConstantExpr * >( expr ) ) {
    9393                        return constExpr->intValue();
     94                // can be -1, +1, etc.
     95                // } else if ( UntypedExpr * untypedExpr = dynamic_cast< UntypedExpr * >( expr ) ) {
     96                //      if ( untypedExpr-> )
    9497                } else {
    9598                        assertf( false, "Unhandled expression type in getConstValue for enumerators: %s", toString( expr ).c_str() );
  • src/SynTree/Expression.cc

    rbd0b6b62 r0690350  
    108108        //      assert( inst->baseEnum );
    109109        //      EnumDecl * decl = inst->baseEnum;
    110         //      for ( Declaration * member : decl->members ) {
    111         //              if ( member == _var ) {
    112         //                      type->set_lvalue( false );
    113         //              }
     110        //      long long int value;
     111        //      if ( decl->valueOf( var, value ) ) {
     112        //              type->set_lvalue( false );
    114113        //      }
    115114        // }
     
    416415                } else {
    417416                        // references have been removed, in which case dereference returns an lvalue of the base type.
    418                         ret->get_result()->set_lvalue( true );
     417                        ret->result->set_lvalue( true );
    419418                }
    420419        }
Note: See TracChangeset for help on using the changeset viewer.