Changes in src/InitTweak/GenInit.cpp [90e683b:e6491ca]
- File:
-
- 1 edited
-
src/InitTweak/GenInit.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/GenInit.cpp
r90e683b re6491ca 164 164 ast::ObjectDecl * arrayDimension = nullptr; 165 165 166 if ( auto ty = dynamic_cast< const ast::TypeExpr * >( arrayType->dimension.get() ) ) { 166 const ast::TypeExpr * ty = dynamic_cast< const ast::TypeExpr * >( arrayType->dimension.get() ); 167 if ( ty ) { 167 168 auto inst = ty->type.as<ast::EnumInstType>(); 168 if ( inst && !inst->base->is_c_enum() ) { 169 arrayDimension = new ast::ObjectDecl( 170 arrayType->dimension->location, 171 dimensionName.newName(), 172 new ast::BasicType( ast::BasicKind::UnsignedChar ), 173 new ast::SingleInit( 169 if ( inst ) { 170 if ( inst->base->isCfa ) { 171 arrayDimension = new ast::ObjectDecl( 174 172 arrayType->dimension->location, 175 ast::ConstantExpr::from_int( arrayType->dimension->location, inst->base->members.size() ) 176 ) 177 ); 173 dimensionName.newName(), 174 new ast::BasicType( ast::BasicKind::UnsignedChar ), 175 new ast::SingleInit( 176 arrayType->dimension->location, 177 ast::ConstantExpr::from_int( arrayType->dimension->location, inst->base->members.size() ) 178 ) 179 ); 180 // return arrayType; 181 } 178 182 } 179 183 }
Note:
See TracChangeset
for help on using the changeset viewer.