Changeset 90e683b for src/ResolvExpr/ResolveTypeof.cpp
- Timestamp:
- Feb 3, 2025, 11:46:55 AM (11 months ago)
- Branches:
- master
- Children:
- 54f70c6
- Parents:
- bbbff10
- File:
-
- 1 edited
-
src/ResolvExpr/ResolveTypeof.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ResolveTypeof.cpp
rbbbff10 r90e683b 62 62 // replace basetypeof(<enum>) by int 63 63 auto enumInst = newType.as< ast::EnumInstType >(); 64 if ( enumInst && (!enumInst->base || !enumInst->base->isCfa) ) {64 if ( enumInst && (!enumInst->base || enumInst->base->is_c_enum() ) ) { 65 65 newType = new ast::BasicType( 66 66 ast::BasicKind::SignedInt, newType->qualifiers, copy(newType->attributes) ); … … 144 144 145 145 auto enumInst = decl->type.as<ast::EnumInstType>(); 146 if ( enumInst && enumInst->base->isCfa) {146 if ( enumInst && !enumInst->base->is_c_enum() ) { 147 147 if ( auto init = decl->init.as<ast::SingleInit>() ) { 148 148 if ( auto initExpr = init->value.as<ast::ConstantExpr>() ) { 149 149 if ( initExpr->result.as<ast::ZeroType>() ) { 150 auto newInit = new ast::SingleInit( init->location, 150 auto newInit = new ast::SingleInit( init->location, 151 151 ast::UntypedExpr::createCall( init->location, "lowerBound", {} ) 152 152 );
Note:
See TracChangeset
for help on using the changeset viewer.