| ... | ... | @@ -669,7 +669,7 @@ fn transTypeDefAsBuiltin(c: *Context, typedef_decl: *const ZigClangTypedefNameDe |
| 669 | 669 | } |
| 670 | 670 | |
| 671 | 671 | fn checkForBuiltinTypedef(checked_name: []const u8) !?[]const u8 { |
| 672 | | const table = comptime [_][2][]const u8{ |
| 672 | const table = [_][2][]const u8{ |
| 673 | 673 | .{ "uint8_t", "u8" }, |
| 674 | 674 | .{ "int8_t", "i8" }, |
| 675 | 675 | .{ "uint16_t", "u16" }, |
| ... | ... | @@ -1409,10 +1409,9 @@ fn transDeclStmt(rp: RestorePoint, scope: *Scope, stmt: *const ZigClangDeclStmt) |
| 1409 | 1409 | |
| 1410 | 1410 | const underlying_qual = ZigClangTypedefNameDecl_getUnderlyingType(typedef_decl); |
| 1411 | 1411 | const underlying_type = ZigClangQualType_getTypePtr(underlying_qual); |
| 1412 | | const underlying_name = try c.str(ZigClangType_getTypeClassName(underlying_type)); |
| 1413 | 1412 | |
| 1414 | 1413 | const mangled_name = try block_scope.makeMangledName(c, name); |
| 1415 | | if (try checkForBuiltinTypedef(underlying_name)) |builtin| { |
| 1414 | if (try checkForBuiltinTypedef(name)) |builtin| { |
| 1416 | 1415 | try block_scope.variables.push(.{ |
| 1417 | 1416 | .alias = builtin, |
| 1418 | 1417 | .name = mangled_name, |