- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/ImplementEnumFunc.cpp
r5f210c0 r0c327ce 25 25 : decl(decl), 26 26 functionNesting{functionNesting}, 27 // quasi_void_decl(new ast::StructDecl(decl->location, 28 // "quasi_void", ast::AggregateDecl::Struct, 29 // {}, ast::Linkage::AutoGen)), 27 30 proto_linkage{ast::Linkage::Cforall} {} 28 31 … … 191 194 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 192 195 {new ast::ObjectDecl(getLocation(), "_ret", 193 new ast::BasicType(ast::BasicKind:: SignedInt))});196 new ast::BasicType(ast::BasicKind::UnsignedInt))}); 194 197 } 195 198 … … 226 229 return genProto( 227 230 "fromInt_unsafe", 228 {new ast::ObjectDecl(getLocation(), "_i", new ast::BasicType(ast::BasicKind:: SignedInt))},231 {new ast::ObjectDecl(getLocation(), "_i", new ast::BasicType(ast::BasicKind::UnsignedInt))}, 229 232 {new ast::ObjectDecl(getLocation(), "_ret", new ast::EnumInstType(decl))} 230 233 ); … … 235 238 "fromInstance", 236 239 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 237 {new ast::ObjectDecl(getLocation(), "_ret", new ast::BasicType(ast::BasicKind:: SignedInt))}240 {new ast::ObjectDecl(getLocation(), "_ret", new ast::BasicType(ast::BasicKind::UnsignedInt))} 238 241 ); 239 242 } … … 282 285 func->location, 283 286 new ast::VariableExpr(func->location, param), 284 new ast::BasicType(ast::BasicKind:: SignedInt),287 new ast::BasicType(ast::BasicKind::UnsignedInt), 285 288 ast::GeneratedFlag::ExplicitCast 286 289 ); … … 380 383 func->location, 381 384 new ast::VariableExpr( func->location, func->params.front() ), 382 new ast::BasicType( ast::BasicKind:: SignedInt ),385 new ast::BasicType( ast::BasicKind::UnsignedInt ), 383 386 ast::GeneratedFlag::ExplicitCast 384 387 )}); … … 404 407 func->location, 405 408 new ast::VariableExpr(func->location, func->params.front()), 406 new ast::BasicType( ast::BasicKind:: SignedInt ),409 new ast::BasicType( ast::BasicKind::UnsignedInt ), 407 410 ast::GeneratedFlag::ExplicitCast); 408 411 func->stmts = new ast::CompoundStmt(
Note: See TracChangeset
for help on using the changeset viewer.