- Timestamp:
- Aug 3, 2024, 11:36:26 PM (5 weeks ago)
- Branches:
- master
- Children:
- 06ecda9
- Parents:
- 4e107bf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ResolveTypeof.cpp
r4e107bf r1571e4d 130 130 mutDecl->type = renameTyVars(mutDecl->type, RenameMode::GEN_EXPR_ID); 131 131 mutDecl->isTypeFixed = true; 132 133 auto enumInst = decl->type.as<ast::EnumInstType>(); 134 if ( enumInst && enumInst->base->isCfa ) { 135 if ( auto init = decl->init.as<ast::SingleInit>() ) { 136 if ( auto initExpr = init->value.as<ast::ConstantExpr>() ) { 137 if ( initExpr->result.as<ast::ZeroType>() ) { 138 auto newInit = new ast::SingleInit( init->location, 139 ast::UntypedExpr::createCall( init->location, "lowerBound", {} ) 140 ); 141 mutDecl->init = newInit; 142 } 143 } 144 } 145 } 146 132 147 return mutDecl; 133 148 }
Note: See TracChangeset
for help on using the changeset viewer.