Ignore:
Timestamp:
Aug 5, 2024, 4:42:46 PM (9 hours ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
0e6cf54c
Parents:
7f18438
Message:
  1. Add implicit const to enum base type; 2. change auto initializer to +1 (rvalue addtion)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/ImplementEnumFunc.cpp

    r7f18438 r830edc6  
    148148        } else {
    149149                auto untypedThisInit = new ast::UntypedExpr(
    150                         getLocation(), new ast::NameExpr(getLocation(), "?++"),
    151                         {prevInitExpr});
     150                        getLocation(), new ast::NameExpr(getLocation(), "?+?"),
     151                        {       prevInitExpr,
     152                                new ast::ConstantExpr( getLocation(), new ast::OneType, "1", 1) });
    152153                return new ast::SingleInit(getLocation(), untypedThisInit);
    153154        }
Note: See TracChangeset for help on using the changeset viewer.