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/Parser/TypeData.cpp

    r7f18438 r830edc6  
    14541454        assert( td->kind == TypeData::Aggregate );
    14551455        assert( td->aggregate.kind == ast::AggregateDecl::Enum );
    1456         ast::Type * baseType = td->base ? typebuild(td->base) : nullptr;
     1456        ast::ptr<ast::Type> baseType = td->base ? typebuild(td->base) : nullptr;
     1457        if ( baseType ) {
     1458                ast::add_qualifiers( baseType, ast::CV::Qualifiers( ast::CV::Const ));
     1459        }
     1460
    14571461        ast::EnumDecl * ret = new ast::EnumDecl(
    14581462                td->location,
Note: See TracChangeset for help on using the changeset viewer.