Ignore:
Timestamp:
Aug 20, 2018, 6:01:05 PM (3 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
2b79a70
Parents:
f271bdd
Message:

Remove lvalue qualifier from objects of typeof type after resolving [fixes #103]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    rf271bdd r51fcdbc7  
    304304        void Resolver::previsit( ObjectDecl *objectDecl ) {
    305305                Type *new_type = resolveTypeof( objectDecl->get_type(), indexer );
     306                new_type->get_qualifiers() -= Type::Lvalue; // even if typeof is lvalue, variable can never have lvalue-qualified type
    306307                objectDecl->set_type( new_type );
    307308                // To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that class-variable
Note: See TracChangeset for help on using the changeset viewer.